forked from changbowen/Ken-Burns-Slideshow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditWindow.xaml
117 lines (116 loc) · 7.4 KB
/
EditWindow.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="EditWindow"
Title="{StaticResource edit slides}" Icon="KenBurns.ico" Loaded="Window_Loaded" Closing="Window_Closing"
UseLayoutRounding="True" Height="467" Width="609">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Grid.Column="0" Margin="10">
<GroupBox.Header>
<Run Text="{Binding Mode=OneTime, Source={StaticResource image list}, StringFormat=* \{0\}}"/>
</GroupBox.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox x:Name="LB_Pic" SelectionMode="Extended" DisplayMemberPath="[0]" MinHeight="300" MinWidth="200" Margin="0,0,0,4"/>
<DockPanel Grid.Row="1">
<Button x:Name="Btn_Up" Content="↑" Width="22" Height="22"/>
<Button x:Name="Btn_Down" Content="↓" Width="22" Height="22" Margin="5,0"/>
<Button x:Name="Btn_Reset" Content="{StaticResource reset list}" HorizontalAlignment="Right" Width="88" Height="22" ToolTip="{StaticResource tip_resetlist}"/>
</DockPanel>
</Grid>
</GroupBox>
<Grid Grid.Column="1" Margin="10">
<Grid.Resources>
<Style TargetType="TextBox">
<Setter Property="Margin" Value="2"/>
<Setter Property="BorderBrush" Value="LightSteelBlue"/>
</Style>
<Style TargetType="ComboBox">
<Setter Property="Margin" Value="2"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="BorderBrush" Value="LightSteelBlue"/>
</Style>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="Slider">
<Setter Property="Margin" Value="2"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<ObjectDataProvider x:Key="AllColors" ObjectInstance="{x:Type Colors}" MethodName="GetProperties"/>
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="Source" Direction="Ascending"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="32*"/>
<RowDefinition Height="200*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource onscreen date}, StringFormat=\{0\}}"/>
<CheckBox x:Name="CB_Title" Grid.Row="1" VerticalAlignment="Center" ToolTip="{StaticResource tip_titleslide}">
<Run Text="{Binding Mode=OneTime, Source={StaticResource title slide}, StringFormat=* \{0\}}"/>
</CheckBox>
<TextBlock x:Name="T_DateShown" Text="{StaticResource none}" Grid.Column="1"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource text shown}, StringFormat=* \{0\}}" Grid.Row="2"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource font family}, StringFormat=* \{0\}}" Grid.Row="3"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource font size ratio}, StringFormat=* \{0\}}" Grid.Row="4"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource font color}, StringFormat=* \{0\}}" Grid.Row="5"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource font offset hor}, StringFormat=* \{0\}}" Grid.Row="6"/>
<TextBlock Text="{Binding Mode=OneTime, Source={StaticResource font offset ver}, StringFormat=* \{0\}}" Grid.Row="7"/>
<TextBox x:Name="TB_Text" Grid.Column="1" Grid.Row="2"/>
<ComboBox x:Name="CbB_FontFamily" Grid.Column="1" Grid.Row="3" SelectedValuePath="Source" ItemsSource="{Binding Source={StaticResource SortedFonts}}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Source}" FontFamily="{Binding Source}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Slider x:Name="Sld_FontSize" Grid.Column="1" Grid.Row="4" IsDirectionReversed="True" Maximum="30" Minimum="1" SmallChange="1" LargeChange="5" Value="12"/>
<ComboBox x:Name="CbB_FontColor" Grid.Column="1" Grid.Row="5" ItemsSource="{Binding Source={StaticResource AllColors}}" SelectedValuePath="Name">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel MaxWidth="190"/>
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1" BorderBrush="Gray" CornerRadius="2" Width="16" Height="16" Margin="2" Background="{Binding Name}" ToolTip="{Binding Name}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Slider x:Name="Sld_FontOffsetH" Grid.Column="1" Grid.Row="6" Maximum="100" Minimum="-100" SmallChange="1" LargeChange="10"/>
<Slider x:Name="Sld_FontOffsetV" Grid.Column="1" Grid.Row="7" Maximum="100" Minimum="-100" SmallChange="1" LargeChange="10"/>
<Image x:Name="IMG_Preview" Grid.Row="8" Grid.ColumnSpan="2" Margin="8"/>
<TextBlock Grid.ColumnSpan="2" Grid.Row="9" TextWrapping="Wrap" Text="{StaticResource star}" MaxWidth="300"/>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="10" HorizontalAlignment="Right" Margin="0,5,0,0">
<Button x:Name="Btn_Save" Content="{StaticResource save}" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="64" MinHeight="28" IsDefault="True"/>
<Button x:Name="Btn_Cancel" Content="{StaticResource cancel}" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="64" MinHeight="28" IsCancel="True" Margin="5,0,0,0"/>
</StackPanel>
</Grid>
</Grid>
</Window>