diff --git a/src/App/DivideByHundredConverter.cs b/src/App/DivideByHundredConverter.cs new file mode 100644 index 0000000..55894b8 --- /dev/null +++ b/src/App/DivideByHundredConverter.cs @@ -0,0 +1,23 @@ +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace ModernWpfPlayground; + +public class DivideByHundredConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (double)value / 100d; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} \ No newline at end of file diff --git a/src/App/MainWindow.xaml b/src/App/MainWindow.xaml index 03dfee6..4977d64 100644 --- a/src/App/MainWindow.xaml +++ b/src/App/MainWindow.xaml @@ -2,12 +2,12 @@ x:Class="ModernWpfPlayground.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="clr-namespace:Controls;assembly=Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" xmlns:local="clr-namespace:ModernWpfPlayground" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" - xmlns:controls="clr-namespace:Controls;assembly=Controls" x:Name="Window" Title="{Binding Title}" Width="{Binding WindowWidth, Mode=TwoWay}" @@ -27,7 +27,11 @@ - + + + + + + + + + + + DockPanel.Dock="Bottom" + LayoutTransform="{StaticResource ZoomSliderScaleTransform}"> - - + + + + + + + + -