Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to set a UserControl to Content Control available in Window

$
0
0

Hi,

I have a user control and a Window in WPF Application. I want to bind the usercontrol in the contentcontrol from the XAML only. I tried in the below way but its not binding. Can you help me how to do it.

UserControl.xaml

<TreeView> <treeviewitem header="Sample"></treeviewitem>

MainWindow.xaml

<Grid>
                    <ContentControl Content="{Binding UcLeftNav}" Width="232" Name="CCLeftNavHolder" />
</Grid>


Viewing all articles
Browse latest Browse all 18858

Trending Articles