-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.xaml
91 lines (79 loc) · 5.57 KB
/
Settings.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<Window
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:local="clr-namespace:Timer2._0"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="Settings"
xmlns:ComponentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
mc:Ignorable="d"
Title="Configurações" Height="290.45" Width="303.1" ResizeMode="NoResize" Topmost="{Binding AllwaysVisible, Mode=TwoWay, Source={x:Static local:MySettings.Default}}">
<Window.Resources>
<CollectionViewSource x:Key="SortedFontsCollection" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" >
<CollectionViewSource.SortDescriptions>
<ComponentModel:SortDescription PropertyName="Source" />
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Label Content="Fonte:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center"/>
<ComboBox x:Name="FontsComboBox"
ItemsSource="{Binding Source={StaticResource SortedFontsCollection}}"
SelectedItem="{Binding FontFamily, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"
Margin="5" Grid.Column="1" VerticalContentAlignment="Center"/>
<Label Content="Peso:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="1"/>
<ComboBox x:Name="WeightComboBox"
SelectedItem="{Binding FontWeight, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"
Margin="5" Grid.Column="1" Grid.Row="1" VerticalContentAlignment="Center">
<x:Static Member="FontWeights.Black"/>
<x:Static Member="FontWeights.Bold"/>
<x:Static Member="FontWeights.ExtraBlack"/>
<x:Static Member="FontWeights.ExtraBold"/>
<x:Static Member="FontWeights.ExtraLight"/>
<x:Static Member="FontWeights.Light"/>
<x:Static Member="FontWeights.Medium"/>
<x:Static Member="FontWeights.Normal"/>
<x:Static Member="FontWeights.SemiBold"/>
<x:Static Member="FontWeights.Thin"/>
</ComboBox>
<Label Content="Estilo:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="2"/>
<ComboBox x:Name="StyleComboBox"
SelectedItem="{Binding FontStyle, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"
Margin="5" Grid.Column="1" Grid.Row="2" VerticalContentAlignment="Center">
<x:Static Member="FontStyles.Normal"/>
<x:Static Member="FontStyles.Italic"/>
<x:Static Member="FontStyles.Oblique"/>
</ComboBox>
<Label Content="Cor da Fonte:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="3"/>
<xctk:ColorPicker x:Name="ForegroundColorPicker"
Grid.Column="1" Grid.Row="3" Margin="5" VerticalContentAlignment="Stretch" AvailableColorsSortingMode="HueSaturationBrightness" AvailableColorsHeader="Cores Disponíveis" AdvancedButtonHeader="Avançado" ColorMode="ColorCanvas" ShowStandardColors="False" ShowAvailableColors="False" ShowAdvancedButton="False" ShowDropDownButton="False"
SelectedColor="{Binding ForegroundColor, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"/>
<Label Content="Cor do Fundo:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="4"/>
<xctk:ColorPicker x:Name="BackgroundColorPicker"
Grid.Column="1" Grid.Row="4" Margin="5" VerticalContentAlignment="Stretch" AvailableColorsSortingMode="HueSaturationBrightness" AvailableColorsHeader="Cores Disponíveis" AdvancedButtonHeader="Avançado" ColorMode="ColorCanvas" ShowStandardColors="False" ShowAvailableColors="False" ShowAdvancedButton="False" ShowDropDownButton="False"
SelectedColor="{Binding BackgroundColor, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"/>
<Label Content="Fechar ao Zerar:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="5"/>
<CheckBox x:Name="CloseWhenZero"
Content="" Grid.Column="1" Margin="5,2,0,0" Grid.Row="5" VerticalContentAlignment="Center"
IsChecked="{Binding CloseWhenZero, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"/>
<Label Content="Sempre Visível:" Margin="10,0,0,0" Padding="0" VerticalContentAlignment="Center" Grid.Row="6"/>
<CheckBox x:Name="AllwaysVisible"
Content="" Grid.Column="1" Margin="5,2,0,0" Grid.Row="6" VerticalContentAlignment="Center"
IsChecked="{Binding AllwaysVisible, Mode=TwoWay, Source={x:Static local:MySettings.Default}}"/>
<Button x:Name="OKBtn" Content="OK" Grid.Column="1" Margin="0,10,10,10" Grid.Row="6" IsDefault="True" HorizontalAlignment="Right" Width="80" Grid.RowSpan="2"/>
</Grid>
</Window>