Answer the question
In order to leave comments, you need to log in
Problem with UserControl, how to delimit content sheets?
There is a UserControl that provides content change.
The control's markup is a ContentPresenter that receives information from a ContentList:
#region Contentlist
public static readonly DependencyProperty ContentListProperty =
DependencyProperty.Register("ContentList", typeof(List<UIElement>), typeof(DynamicContentViewer), new PropertyMetadata(new List<UIElement>()));
public List<UIElement> ContentList
{
get
{
return (List<UIElement>)this.GetValue(ContentListProperty);
}
set
{
this.SetValue(ContentListProperty, value);
}
}
#endregion
<customs:DynamicContentViewer x:Name="LeftPanelViewer"
Loaded="LeftPanelViewer_Loaded"
NavigateMode="0">
<customs:DynamicContentViewer.ContentList>
<TextBlock />
<TextBlock />
</customs:DynamicContentViewer.ContentList>
</customs:DynamicContentViewer>
<customs:DynamicContentViewer x:Name="MainPanelViewer"
Loaded="MainPanelViewer_Loaded"
NavigateMode="0">
<customs:DynamicContentViewer.ContentList>
<TextBox />
<TextBox />
</customs:DynamicContentViewer.ContentList>
</customs:DynamicContentViewer>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question