void UpdateContent(Cell newCell) { global::Windows.UI.Xaml.DataTemplate dt = GetTemplate(newCell); if (dt != _currentTemplate || Content == null) { _currentTemplate = dt; Content = dt.LoadContent(); } ((FrameworkElement)Content).DataContext = newCell; }
public ShellFlyoutTemplateSelector() { BaseShellItemTemplate = (global::Windows.UI.Xaml.DataTemplate)global::Windows.UI.Xaml.Application.Current.Resources["ShellFlyoutBaseShellItemTemplate"]; MenuItemTemplate = (global::Windows.UI.Xaml.DataTemplate)global::Windows.UI.Xaml.Application.Current.Resources["ShellFlyoutMenuItemTemplate"]; SeperatorTemplate = (global::Windows.UI.Xaml.DataTemplate)global::Windows.UI.Xaml.Application.Current.Resources["ShellFlyoutSeperatorTemplate"]; }