Example #1
0
        public static void SetDock(
            UIElement element,
            NativeDockRegion dock)
        {
            if (element == null)
            {
                throw new ArgumentNullException(nameof(element));
            }

            element.SetValue(DockProperty, dock);
        }
Example #2
0
        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();
            }
        }