private static UIElement MakeSpace(RingLabel label) { var space = new Rectangle(); BindingOperations.SetBinding(space, FrameworkElement.WidthProperty, new Binding { Source = label, Path = new PropertyPath("FontSize"), Mode = BindingMode.TwoWay }); BindingOperations.SetBinding(space, FrameworkElement.HeightProperty, new Binding { Source = label, Path = new PropertyPath("FontSize"), Mode = BindingMode.TwoWay }); return space; }
private static UIElement MakeSpace(RingLabel label) { var space = new Rectangle(); BindingOperations.SetBinding(space, FrameworkElement.WidthProperty, new Binding { Source = label, Path = new PropertyPath("FontSize"), Mode = BindingMode.TwoWay }); BindingOperations.SetBinding(space, FrameworkElement.HeightProperty, new Binding { Source = label, Path = new PropertyPath("FontSize"), Mode = BindingMode.TwoWay }); return(space); }