-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathWin_Options.xaml
64 lines (60 loc) · 4.15 KB
/
Win_Options.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<l:RoundedWindow x:Class="DesktopNote.Win_Options"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wtk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:l="clr-namespace:DesktopNote"
Title="{StaticResource menu_options}" ResizeMode="NoResize" FontSize="10"
SizeToContent="WidthAndHeight" Loaded="Window_Loaded">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="Button" BasedOn="{StaticResource ContentControlBaseStyle}">
<Setter Property="Margin" Value="4 0"/>
<Style.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ContentControl" BasedOn="{StaticResource ContentControlBaseStyle}">
<Setter Property="Margin" Value="4"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Grid.Resources>
<TextBlock Grid.Row="0" Grid.Column="0" Text="{StaticResource label_content_path}" VerticalAlignment="Center" Margin="4 2"/>
<ContentControl Grid.Row="0" Grid.Column="1" Height="20">
<TextBox x:Name="TB_SavePath" IsReadOnly="True" Cursor="Hand" BorderThickness="0" VerticalContentAlignment="Center"
Height="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
PreviewMouseDoubleClick="TB_SavePath_PreviewMouseDoubleClick"/>
</ContentControl>
<TextBlock Grid.Row="1" Grid.Column="0" Text="{StaticResource label_content_path_txt}" VerticalAlignment="Center" Margin="4 2"/>
<ContentControl Grid.Row="1" Grid.Column="1" Height="20">
<TextBox x:Name="TB_SavePathTxt" IsReadOnly="True" BorderThickness="0" VerticalContentAlignment="Center" IsEnabled="False"
Height="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"/>
</ContentControl>
<TextBlock Grid.Row="2" Grid.Column="0" Text="{StaticResource label_undock_delay}" VerticalAlignment="Center" Margin="4 2"/>
<ContentControl Grid.Row="2" Grid.Column="1" Height="20">
<wtk:IntegerUpDown x:Name="IUD_UndockDelay" BorderThickness="0" VerticalContentAlignment="Center"
Height="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"/>
</ContentControl>
<CheckBox Grid.Row="3" x:Name="CB_AutoStart" Margin="4 2" Content="{StaticResource menu_auto_start}" Click="CB_AutoStart_Click" VerticalAlignment="Center"/>
<CheckBox Grid.Row="4" x:Name="CB_AutoDock" Margin="4 2" Content="{StaticResource menu_auto_dock}" Click="CB_AutoDock_Click" VerticalAlignment="Center"/>
<UniformGrid Grid.Row="3" Grid.Column="1" Rows="1" Grid.RowSpan="2" Margin="0 4">
<Button Grid.Row="2" Grid.Column="1" Content="{StaticResource menu_reset_formats}" Click="Button_ResetFormats_Click"/>
<Button Grid.Row="3" Grid.Column="4" Content="{StaticResource menu_reset_settings}" Click="Button_ResetSet_Click"/>
<Button Grid.Row="4" Grid.Column="4" Content="{StaticResource menu_about}" Click="Button_About_Click"/>
</UniformGrid>
</Grid>
</l:RoundedWindow>