Hi,
I created a Menu.Xaml and put it under the project (same location of App.Xaml). I can not access the Xaml as per the code given by telerik. Please guide am i missing some thing in the code...
When I pass following way, I get "Object reference not set to an instance of an object." l Exception
<UserControl.DataContext>
<local:MenuViewModel Source="/ProjectName;ProjectName/Menu.xaml" />
</UserControl.DataContext>
And When i pass following way, I get "Expected relative Uri, found absolute." Exception
<UserControl.DataContext>
<local:MenuViewModel Source="pack:/ProjectNames:/Menu.xaml" />
</UserControl.DataContext>
Exception comes on following bold lines
if (this.Source == null) return;
using (StreamReader reader = new StreamReader(
Application.GetResourceStream(this.Source).Stream))
{
string xaml = reader.ReadToEnd();
this._items = ParseXaml(xaml);
}
Please reply,
Ankur