コード例 #1
0
        private static void OnOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue == null || e.OldValue == null)
            {
                return;
            }
            TabbedExpander control = d as TabbedExpander;

            if (!control.IsExpanded)
            {
                control.Height = control.EXPANDER_NOTEXPANDED_HEIGHT - (double)e.NewValue;
            }
        }
コード例 #2
0
        private static void OnNotExpandedHeightChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue == null || e.OldValue == null)
            {
                return;
            }
            TabbedExpander control = d as TabbedExpander;

            if (!control.IsExpanded)
            {
                control.Height = (double)e.NewValue;// - control.EXPANDER_OFFSET;
            }
            control.NotifyPropChanged("EXPANDER_NOTEXPANDED_HEIGHT");
        }
コード例 #3
0
        private static void OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue == null || e.OldValue == null)
            {
                return;
            }
            TabbedExpander control = d as TabbedExpander;

            if ((bool)e.NewValue)
            {
                control.MinHeight         = control._MinHeight;
                control.VerticalAlignment = VerticalAlignment.Stretch;
                control.Height            = control.EXPANDER_EXPANDED_HEIGHT;

                /*control.SetBinding(
                 *  TabbedExpander.HeightProperty,
                 *  new Binding()
                 *  {
                 *      Source = control,
                 *      Path = new PropertyPath("EXPANDER_EXPANDED_HEIGHT"),
                 *      Mode = BindingMode.OneWay
                 *  });*/
            }
            else
            {
                control.MinHeight         = control.EXPANDER_NOTEXPANDED_HEIGHT;
                control.VerticalAlignment = control._VerticalAlignment;
                control.Height            = control.EXPANDER_NOTEXPANDED_HEIGHT;// - control.EXPANDER_OFFSET;

                /*switch(control.TabStripPlacement)
                 * {
                 *  case Dock.Bottom:
                 *      control.VerticalAlignment = VerticalAlignment.Bottom;
                 *      break;
                 *  case Dock.Left:
                 *      control.HorizontalAlignment = HorizontalAlignment.Left;
                 *      break;
                 *  case Dock.Right:
                 *      control.HorizontalAlignment = HorizontalAlignment.Right;
                 *      break;
                 *  case Dock.Top:
                 *      control.VerticalAlignment = VerticalAlignment.Top;
                 *      break;
                 * }*/
            }
            control.NotifyPropChanged("IsExpanded");
        }
コード例 #4
0
 public Command_ChangeExpandedCommand(TabbedExpander TE)
 {
     this._TE = TE;
 }