blob: 824f19e11e66b5c0774f1523b41f7844c7ebe9f3 (
plain)
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
|
<UserControl x:Class="HandBrakeWPF.Views.ChaptersView"
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:cal="http://www.caliburnproject.org"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
d:DesignHeight="170"
d:DesignWidth="616"
mc:Ignorable="d" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="{x:Static Properties:ResourcesUI.ChaptersView_ChapterMarkers}" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
<Grid Grid.Row="1" Margin="10,5,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<CheckBox Content="{x:Static Properties:ResourcesUI.ChaptersView_CreateChapterMarkers}" IsChecked="{Binding IncludeChapterMarkers}" Grid.Column="0" VerticalAlignment="Center" />
<Button Content="{x:Static Properties:ResourcesUI.ChaptersView_Import}" Name="import" Grid.Column="2" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Import]" />
<Button Content="{x:Static Properties:ResourcesUI.ChaptersView_Export}" Name="export" Grid.Column="3" Width="75" cal:Message.Attach="[Event Click] = [Action Export]" />
</Grid>
<DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters}"
VerticalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility="Column"
HorizontalGridLinesBrush="#FFABADB3" VerticalGridLinesBrush="#FFABADB3">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="MinHeight" Value="22" />
</Style>
</DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static Properties:ResourcesUI.ChapterView_ImportNames}" cal:Message.Attach="[Event Click] = [Action Import]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.ChapterView_ExportNames}" cal:Message.Attach="[Event Click] = [Action Export]" />
<Separator />
<MenuItem Header="{x:Static Properties:ResourcesUI.ChapterView_ResetChapterNames}" cal:Message.Attach="[Event Click] = [Action Reset]" />
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static Properties:ResourcesUI.ChaptersView_ChapterNumber}" Width="120" Binding="{Binding ChapterNumber}" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static Properties:ResourcesUI.ChaptersView_Duration}" Width="100" Binding="{Binding Duration}" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static Properties:ResourcesUI.ChaptersView_ChapterName}" Width="*" Binding="{Binding ChapterName}" IsReadOnly="False" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>
|