-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExample11.xaml
56 lines (53 loc) · 3.08 KB
/
Example11.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
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Name="MainWindow"
Title="Examples"
Height="500"
Width="500"
Style="{DynamicResource MaterialDesignWindow}"
WindowStartupLocation="CenterScreen"
ResizeMode="CanResize"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontSize="14"
TextElement.FontFamily="Roboto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}" >
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.BlueGrey.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.DeepOrange.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal">
<Button Name="Btn_OpenFile" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Open File" Margin="5">
<materialDesign:PackIcon Kind="FolderOpenOutline" Height="25" Width="25" />
</Button>
<Button Name="Btn_SaveFile" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Save File" Margin="5">
<materialDesign:PackIcon Kind="ContentSaveOutline" Height="25" Width="25" />
</Button>
</StackPanel>
<TextBox Name="TextBox_Editor" Style="{StaticResource MaterialDesignOutlinedTextBox}" VerticalAlignment="Top" Height="300" Width="400"
AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Margin="0,10,0,0">
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Name="TextBox_Editor_CopySelectedToClipboard_MenuItm" Header="Copy Selected Text To Clipboard (Ctrl+C)" />
<MenuItem Name="TextBox_Editor_CopyAllToClipboard_MenuItm" Header="Copy All To Clipboard (Ctrl+A -> Ctrl+C)" />
<MenuItem Name="TextBox_Editor_PasteFromClipboard_MenuItm" Header="Paste (Ctrl+V)" />
<MenuItem Name="TextBox_Editor_CutToClipboard_MenuItm" Header="Cut (Ctrl+X)" />
<Separator />
<MenuItem Name="TextBox_Editor_AnyOtherAction_MenuItm" Header="Any Other Action" />
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
</StackPanel>
</Grid>
</Window>