Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }