public static void PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { TPageControl control = d as TPageControl; if (control == null) { return; } List <UserControl> children = e.NewValue as List <UserControl>; if (children == null) { return; } control.AddControls(children); }
private static void RightWidthChange(DependencyObject sender, DependencyPropertyChangedEventArgs e) { TPageControl pageControl = (TPageControl)sender; pageControl.RightGrid.Width = new GridLength(pageControl.RightWidth); }