-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMarkdownEditControl.xaml
37 lines (36 loc) · 2.08 KB
/
MarkdownEditControl.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
<UserControl
x:Class="RichMarkdownBox.MarkdownEditControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RichMarkdownBox"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<StackPanel>
<CommandBar x:Name="commandBar" VerticalContentAlignment="Center" OverflowButtonVisibility="Collapsed" >
<AppBarToggleButton Icon="Bold" x:Name="BoldButton" Click="TextFormatButton_Click"/>
<AppBarToggleButton Icon="Italic" x:Name="ItalicButton" Click="TextFormatButton_Click"/>
<AppBarToggleButton Icon="Underline" x:Name="underLineButton" Click="TextFormatButton_Click"/>
<CommandBar.Content>
<ComboBox VerticalAlignment="Center" x:Name="headerSelector" SelectionChanged="ComboBox_SelectionChanged" Tapped="headerSelector_Tapped" DropDownOpened="headerSelector_DropDownOpened" Margin="0,0,0,8">
<ComboBoxItem Name="noHeader" Content="No Header"/>
<ComboBoxItem Name="h1Button">
<TextBlock Text="Heading 1" FontSize="20.5" FontWeight="Bold"/>
</ComboBoxItem>
<ComboBoxItem Name="h2Button">
<TextBlock Text="Heading 2" FontSize="20.5" FontWeight="Medium"/>
</ComboBoxItem>
<ComboBoxItem Name="h3Button">
<TextBlock Text="Heading 3" FontSize="18.3" FontWeight="Bold"/>
</ComboBoxItem>
<ComboBoxItem Name="h4Button">
<TextBlock Text="Heading 4" FontSize="18.3" FontWeight="Medium"/>
</ComboBoxItem>
</ComboBox>
</CommandBar.Content>
</CommandBar>
<local:RichMarkdownBox x:Name="editor" SelectionChanged="editor_SelectionChanged" FontSize="16"/>
</StackPanel>
</UserControl>