Note that there are some explanatory texts on larger screens.

plurals
  1. POBinding Does not Commit?
    primarykey
    data
    text
    <p>I have a <code>TabControl</code> bound to a <code>ICollectionView</code> with derives from <code>ObservableCollection&lt;EditorTabViewModel&gt;</code>. I think quite standard MVVM Multi-Document pattern? Anyways, <code>EditorTabViewModel</code> has a property <code>Content</code> that contains the string to be displayed. I find that the binding is working ... </p> <pre><code>// Add 2 default tabs for a test, also set their Content property to the respective values ... _tabs.Add(new EditorTabViewModel { Content = "Tab 1" }); _tabs.Add(new EditorTabViewModel { Content = "Tab 2" }); </code></pre> <p>Its values are correctly rendered</p> <p><strong>XAML</strong></p> <pre><code>&lt;!-- DataTemplate to render EditorTabViewModels --&gt; &lt;DataTemplate DataType="{x:Type vm:EditorTabViewModel}"&gt; &lt;me:MarkdownEditor TextContent="{Binding Path=Content.Content, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" Options="{Binding Path=Options, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" /&gt; &lt;/DataTemplate&gt; </code></pre> <p><strong>Result</strong></p> <p><img src="https://imgur.com/RFi0e.jpg" alt=""></p> <p>But when I change the value, switch tabs and return, I get the string set in the constructor again ... shown in <strong><a href="http://screenr.com/oQc" rel="nofollow noreferrer">this video (on screenr)</a></strong></p> <p>The <strong><a href="http://www.mediafire.com/?ahk686k44vsxuc9" rel="nofollow noreferrer">Visual Studio Solution</a></strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload