2021-02-21 13:04:24 +00:00
|
|
|
<Window x:Class="MassiveKnob.View.SettingsWindow"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:helpers="clr-namespace:MassiveKnob.Helpers"
|
2021-02-24 08:05:11 +00:00
|
|
|
xmlns:viewModel="clr-namespace:MassiveKnob.ViewModel"
|
|
|
|
xmlns:view="clr-namespace:MassiveKnob.View"
|
2021-02-21 13:04:24 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Massive Knob - Settings" Height="555" Width="704.231"
|
2021-02-24 08:05:11 +00:00
|
|
|
WindowStartupLocation="CenterScreen"
|
|
|
|
Style="{StaticResource DefaultWindow}"
|
|
|
|
d:DataContext="{d:DesignInstance Type=viewModel:SettingsViewModel}">
|
2021-02-21 13:04:24 +00:00
|
|
|
<Window.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="../Style.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
<DataTemplate x:Key="DeviceDropdownItem">
|
2021-02-24 08:05:11 +00:00
|
|
|
<StackPanel Orientation="Vertical" d:DataContext="{d:DesignInstance Type=viewModel:DeviceViewModel}">
|
2021-02-21 13:04:24 +00:00
|
|
|
<TextBlock Text="{Binding Name}" />
|
2021-02-24 08:05:11 +00:00
|
|
|
<TextBlock Text="{Binding Description}" Style="{StaticResource ComboBoxDescription}" Visibility="{Binding DescriptionVisibility}" />
|
2021-02-21 13:04:24 +00:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate x:Key="DeviceSelectedItem">
|
2021-02-24 08:05:11 +00:00
|
|
|
<TextBlock Text="{Binding Name}" d:DataContext="{d:DesignInstance Type=viewModel:DeviceViewModel}" />
|
2021-02-21 13:04:24 +00:00
|
|
|
</DataTemplate>
|
|
|
|
</ResourceDictionary>
|
|
|
|
</Window.Resources>
|
|
|
|
|
2021-02-24 18:35:01 +00:00
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
2021-02-21 13:04:24 +00:00
|
|
|
<StackPanel Orientation="Vertical">
|
2021-02-24 08:05:11 +00:00
|
|
|
<!--
|
|
|
|
|
|
|
|
Device
|
|
|
|
|
|
|
|
-->
|
2021-02-21 13:04:24 +00:00
|
|
|
<TextBlock Style="{StaticResource Header}">Device</TextBlock>
|
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical" Style="{StaticResource Content}">
|
2021-02-24 08:05:11 +00:00
|
|
|
<ComboBox
|
|
|
|
ItemsSource="{Binding Devices}"
|
|
|
|
SelectedItem="{Binding SelectedDevice}"
|
|
|
|
IsSynchronizedWithCurrentItem="False"
|
|
|
|
ItemTemplateSelector="{helpers:ComboBoxTemplateSelector
|
|
|
|
SelectedItemTemplate={StaticResource DeviceSelectedItem},
|
|
|
|
DropdownItemsTemplate={StaticResource DeviceDropdownItem}}" />
|
|
|
|
|
2021-02-21 13:04:24 +00:00
|
|
|
|
2021-02-24 08:05:11 +00:00
|
|
|
<ContentControl Focusable="False" Content="{Binding SettingsControl}" Style="{StaticResource SettingsControl}" />
|
2021-02-21 13:04:24 +00:00
|
|
|
</StackPanel>
|
2021-02-24 08:05:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
Analog inputs
|
|
|
|
|
|
|
|
-->
|
|
|
|
<TextBlock Style="{StaticResource Header}" Visibility="{Binding AnalogInputVisibility}">Analog inputs</TextBlock>
|
|
|
|
|
|
|
|
<ItemsControl ItemsSource="{Binding AnalogInputs}">
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<view:InputOutputView />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
Digital inputs
|
|
|
|
|
|
|
|
-->
|
|
|
|
<TextBlock Style="{StaticResource Header}" Visibility="{Binding DigitalInputVisibility}">Digital inputs</TextBlock>
|
|
|
|
|
|
|
|
<ItemsControl ItemsSource="{Binding DigitalInputs}">
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<view:InputOutputView />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
Analog outputs
|
|
|
|
|
|
|
|
-->
|
|
|
|
<TextBlock Style="{StaticResource Header}" Visibility="{Binding AnalogOutputVisibility}">Analog outputs</TextBlock>
|
|
|
|
|
|
|
|
<ItemsControl ItemsSource="{Binding AnalogOutputs}">
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<view:InputOutputView />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
Digital outputs
|
2021-02-21 13:04:24 +00:00
|
|
|
|
2021-02-24 08:05:11 +00:00
|
|
|
-->
|
|
|
|
<TextBlock Style="{StaticResource Header}" Visibility="{Binding DigitalOutputVisibility}">Digital outputs</TextBlock>
|
2021-02-21 13:04:24 +00:00
|
|
|
|
2021-02-24 08:05:11 +00:00
|
|
|
<ItemsControl ItemsSource="{Binding DigitalOutputs}">
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<view:InputOutputView />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
2021-02-21 13:04:24 +00:00
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Window>
|