Note that there are some explanatory texts on larger screens.

plurals
  1. POItemsControl inside my UserControl is not updating
    primarykey
    data
    text
    <p>I'm having trouble with my UserControl with following source code:</p> <pre><code>[ContentProperty("SetContent")] public partial class HeaderContainer : UserControl { // Header region public FrameworkElement SetContent { get { return (FrameworkElement)GetValue(SetContentProperty); } set { SetValue(SetContentProperty, value); } } public static readonly DependencyProperty SetContentProperty = DependencyProperty.Register("SetContent", typeof(FrameworkElement), typeof(HeaderContainer), new PropertyMetadata(null)); public HeaderContainer() { InitializeComponent(); DataContext = this; } } </code></pre> <p>This is my XAML </p> <pre><code>&lt;StackPanel&gt; &lt;Border&gt; &lt;TextBlock Text="{Binding Header}" /&gt; &lt;/Border&gt; &lt;ContentPresenter Content="{Binding SetContent}"/&gt; &lt;/StackPanel&gt; </code></pre> <p>And here is my Problem:</p> <pre><code>&lt;c:HeaderContainer Header="List"&gt; &lt;ItemsControl ItemsSource="{Binding ObjectList}" &gt; &lt;ItemsControl.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel&gt; &lt;TextBlock Text="{Binding DisplayName}"/&gt; &lt;TextBlock Text="{Binding SecondLine}" Foreground="Gray" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ItemsControl.ItemTemplate&gt; &lt;/ItemsControl&gt; &lt;/c:HeaderContainer&gt; </code></pre> <p>The Itemscontrol itself is working, also the UserControl, when I add content in XAML. The problem is, when I add Items to ObjectList while it's in the HeaderContainer - nothing happens. Where am I thinking wrong?</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.
    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