I have a panorama control whose data template is as follows: -
<DataTemplate x:Key="DataTemplateCategory">
<Grid >
<localControls:PanoramaItem BookmarkedTopics="{Binding Path=BookmarkedTopics,ElementName=root}" Topics="{Binding Topics}"/>
</Grid>
</DataTemplate>
The root is the name of the usercontrol in which the panorama is defined. and BookmarkedTopics in Path - DependencyProperty in the root (usercontrol), the definition of which is as follows: -
public static readonly DependencyProperty BookmarkedTopicsProperty = DependencyProperty.Register("BookmarkedTopics",
typeof(ObservableCollection<Topic>), typeof(MainPage), new PropertyMetadata(new ObservableCollection<Topic>()));
public ObservableCollection<Topic> BookmarkedTopics
{
get { return GetValue(BookmarkedTopicsProperty) as ObservableCollection<Topic>; }
set
{
SetValue(BookmarkedTopicsProperty, value);
}
}
BookmarkedTopics is set to MainPage_Loaded, and it is never an empty or empty collection (not relevant to my question, but still thought of mentioning it). BookmarkedTopics is the Dependency property in PanoramaItem whose definition is: -
public static readonly DependencyProperty BookmarkedTopicsProperty = DependencyProperty.Register("BookmarkedTopics",
typeof(ObservableCollection<Topic>), typeof(PanoramaItem), new PropertyMetadata(new ObservableCollection<Topic>()));
public ObservableCollection<Topic> BookmarkedTopics
{
get { return GetValue(BookmarkedTopicsProperty) as ObservableCollection<Topic>; }
set
{
SetValue(BookmarkedTopicsProperty, value);
}
}
The problem is when the "Bookmark Topics" tab is set to "MainPage_Loaded", why is the BookmarkedTopics installer in PanoramaItem not fired? Any error you can see in the code?
Thanks in advance:)