MassiveKnob/Windows/MassiveKnob/View/Settings/LoggingView.xaml

51 lines
2.7 KiB
XML

<UserControl x:Class="MassiveKnob.View.Settings.LoggingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModel="clr-namespace:MassiveKnob.ViewModel"
xmlns:helpers="clr-namespace:MassiveKnob.Helpers"
xmlns:massiveKnob="clr-namespace:MassiveKnob"
mc:Ignorable="d"
d:DesignHeight="200" d:DesignWidth="800"
d:DataContext="{d:DesignInstance Type=viewModel:SettingsViewModelDesignTime, IsDesignTimeCreatable=True}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Style.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="LoggingLevelDropdownItem">
<StackPanel Orientation="Vertical" d:DataContext="{d:DesignInstance Type=viewModel:LoggingLevelViewModel}">
<TextBlock Text="{Binding Name}" />
<TextBlock Text="{Binding Description}" Style="{StaticResource ComboBoxDescription}" />
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="LoggingLevelSelectedItem">
<TextBlock Text="{Binding Name}" d:DataContext="{d:DesignInstance Type=viewModel:LoggingLevelViewModel}" />
</DataTemplate>
</ResourceDictionary>
</UserControl.Resources>
<StackPanel Orientation="Vertical" SnapsToDevicePixels="True" UseLayoutRounding="True" TextOptions.TextFormattingMode="Display">
<StackPanel Orientation="Vertical" Style="{StaticResource Content}">
<CheckBox Margin="0,0,0,8" IsChecked="{Binding LoggingEnabled}">
<TextBlock Text="{x:Static massiveKnob:Strings.LoggingEnabled}" />
</CheckBox>
<TextBlock Text="{x:Static massiveKnob:Strings.LoggingLevel}" Style="{StaticResource Label}" />
<ComboBox
Margin="0,0,0,8"
ItemsSource="{Binding LoggingLevels}"
SelectedItem="{Binding SelectedLoggingLevel}"
IsSynchronizedWithCurrentItem="False"
ItemTemplateSelector="{helpers:ComboBoxTemplateSelector
SelectedItemTemplate={StaticResource LoggingLevelSelectedItem},
DropdownItemsTemplate={StaticResource LoggingLevelDropdownItem}}" />
<TextBlock Text="{Binding LoggingOutputPath}" Style="{StaticResource SubLabel}" />
</StackPanel>
</StackPanel>
</UserControl>