Exemplo n.º 1
0
        /// <summary>
        /// Handles changes to the ItemsSource property.
        /// </summary>
        /// <param name="d">PivotPanel</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PivotPanel panel = (PivotPanel)d;
            ObservableCollection <PivotItem> oldItemsSource = (ObservableCollection <PivotItem>)e.OldValue;
            ObservableCollection <PivotItem> newItemsSource = panel.ItemsSource;

            panel.OnItemsSourceChanged(oldItemsSource, newItemsSource);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handles changes to the ContentBackground property.
        /// </summary>
        /// <param name="d">PivotPanel</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnContentBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PivotPanel panel = (PivotPanel)d;
            Brush      oldContentBackground = (Brush)e.OldValue;
            Brush      newContentBackground = panel.ContentBackground;

            panel.OnContentBackgroundChanged(oldContentBackground, newContentBackground);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Handles changes to the HeaderHeight property.
        /// </summary>
        /// <param name="d">PivotPanel</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnHeaderHeightChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PivotPanel panel           = (PivotPanel)d;
            GridLength oldHeaderHeight = (GridLength)e.OldValue;
            GridLength newHeaderHeight = panel.HeaderHeight;

            panel.OnHeaderHeightChanged(oldHeaderHeight, newHeaderHeight);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Sets the parent PivotPanel of the Pivot Item
 /// </summary>
 /// <param name="panel">PivotPanel</param>
 public void SetParent(PivotPanel panel)
 {
     parent = panel;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Sets the parent PivotPanel of the Pivot Item
 /// </summary>
 /// <param name="panel">PivotPanel</param>
 public void SetParent(PivotPanel panel)
 {
     parent = panel;
 }