Exemple #1
0
        private static void ReloadLoaded(ContentControl sender, RoutedEventArgs e)
        {
            ContentControl contentControl = (ContentControl)sender;
            TabControl     tabControl     = ReloadBehavior.Ancestors(contentControl).OfType <TabControl>().FirstOrDefault <TabControl>();

            if (tabControl == null)
            {
                return;
            }
            ReloadBehavior.SetMetroContentControl(tabControl, contentControl);
            tabControl.SelectionChanged -= new SelectionChangedEventHandler(ReloadBehavior.ReloadSelectionChanged);
            tabControl.SelectionChanged += new SelectionChangedEventHandler(ReloadBehavior.ReloadSelectionChanged);
        }