-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettingsControl.xaml
38 lines (38 loc) · 2.47 KB
/
SettingsControl.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<UserControl x:Class="SwitchableProperties.SettingsControl"
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:local="clr-namespace:SwitchableProperties"
xmlns:styles="clr-namespace:SimHub.Plugins.Styles;assembly=SimHub.Plugins" mc:Ignorable="d"
xmlns:ui="clr-namespace:SimHub.Plugins.UI;assembly=SimHub.Plugins"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.CommandBindings>
<CommandBinding Command="{x:Static local:SettingsControl.DeletePropertyCommand}"
Executed="DeleteProperty_OnExecuted"/>
</UserControl.CommandBindings>
<Grid>
<styles:SHSection x:Name="sHSection" Title="SwitchableProperties">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<styles:SHButtonPrimary Grid.Row="0" x:Name="btnAddProperty" HorizontalAlignment="Left" Click="btnAddProperty_Click" ToolTip="Create A New Property">New Property</styles:SHButtonPrimary>
<StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Right">
<styles:SHButtonPrimary x:Name="btnImport" HorizontalAlignment="Left" Click="btnImport_Click" ToolTip="Import and Override all current Properties and Binds">Import</styles:SHButtonPrimary>
<styles:SHButtonPrimary x:Name="btnExport" HorizontalAlignment="Left" Click="btnExport_Click" ToolTip="Export all current Properties and Binds (excluding the keybinds)">Export</styles:SHButtonPrimary>
</StackPanel>
<ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<ItemsControl x:Name="pnlProperties">
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:Property DataContext="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</styles:SHSection>
</Grid>
</UserControl>