Exemplo n.º 1
0
        private void LineScaping_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            var binding = new Binding();

            binding.Source = (sender as Slider).Value + Content_Box.FontSize;
            Content_Box.SetBinding(TextBlock.LineHeightProperty, binding);
        }
Exemplo n.º 2
0
        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            var new_size    = (sender as Slider).Value;
            var old_spacing = (double)Content_Box.GetValue(TextBlock.LineHeightProperty) - Content_Box.FontSize;
            var binding     = new Binding()
            {
                Source = old_spacing + new_size
            };

            Content_Box.SetBinding(TextBlock.LineHeightProperty, binding);
            Content_Box.FontSize = new_size;
        }