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

UserControl and Frame problem

$
0
0

Hi

I have a problem initializing a UserControl containing a Menu control from another MainWindow.xaml.  The UserControl has a Property NavPage which I initialize and set the Page selected by user from the Menu.

Basically, I am initializing the resource as :

<Window.Resources><myApp:NavigationControl x:Key="NavControl" /></Window.Resources>

and using it like :

<Frame x:Name="DisplayFrame" Grid.Row="1" Content="{Binding Source={StaticResource NavControl},Path=NavPage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }" />       

Problem, as soon as I put the <Window.Resources> </..> code, everything just freezes with this exception:

Provide value on 'System.Windows.StaticResourceExtension'

Any advice?  Thanks.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>