internal static object CoerceMinimizedMinWidth(DependencyObject d, object value) { IMinimizeHelped helped = d as IMinimizeHelped; if (helped != null) { Control ctrl = d as Control; double result = (double)value + ctrl.Margin.Left + ctrl.Margin.Right; if (helped.ResizeHelper._thumb != null) { result += helped.ResizeHelper._thumb.ActualWidth; } return(result); } return(value); }
internal static void OnIsMinimizedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is NavigationPane) { d.CoerceValue(NavigationPane.ButtonToolTipProperty); } else { d.CoerceValue(NavigationPaneExpander.ButtonToolTipProperty); } IMinimizeHelped helped = d as IMinimizeHelped; if (helped != null) { helped.OnIsMinimizedChanged(d, e); helped.ResizeHelper.AdjustSizes((bool)e.NewValue); } }