public static void SetDock( UIElement element, NativeDockRegion dock) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(DockProperty, dock); }
private static void OnDockPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e) { UIElement element = (UIElement)d; NativeDockRegion value = (NativeDockRegion)e.NewValue; NativeDockPanel panel = VisualTreeHelper.GetParent(element) as NativeDockPanel; if (panel != null) { panel.InvalidateMeasure(); } }