-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPresentWindow.xaml
More file actions
57 lines (53 loc) · 2.76 KB
/
PresentWindow.xaml
File metadata and controls
57 lines (53 loc) · 2.76 KB
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
<Controls:MetroWindow x:Class="SnippetManager.PresentWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SnippetManager"
Title="PresentWindow"
Name="PresentWindowWindow"
WindowStyle="ToolWindow"
ResizeMode="NoResize"
ShowInTaskbar="False"
Height="300"
Width="20" MaxWidth="20"
Topmost="True"
ShowMinButton="False"
UseNoneWindowStyle="True"
DataContext="{Binding Source={StaticResource Locator}, Path=MainViewModel}" Closed="PresentWindowWindow_Closed">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="293*"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<ListBox x:Name="LstSnippets" HorizontalContentAlignment="Stretch" SelectionMode="Single"
FontSize="12" ItemsSource="{Binding SnippetList, Mode=OneWay}"
SelectedItem="{Binding SelectedSnippet, Mode=TwoWay}"
MouseDoubleClick="lstSnippets_MouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.ToolTip>
<avalonEdit:TextEditor xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit" Name="FctbPreviewEditor" FontFamily="Consolas" SyntaxHighlighting="C#" FontSize="10pt" Document="{Binding Document}" />
</Grid.ToolTip>
<TextBlock Text="{Binding Id}" Grid.Column="0" />
<TextBlock Text="{Binding Label}" Grid.Column="1" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Grid Grid.Row="1" Name="TinyButtonBar">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="o" ToolTip="Move to other side" Click="MoveButton" FontSize="3" />
<Button Grid.Column="1" Content="x" ToolTip="Exit present mode" Click="CloseButton" FontSize="3" />
</Grid>
</Grid>
</Controls:MetroWindow>