diff options
Diffstat (limited to 'MarkdownEditor/MainWindow.xaml')
| -rw-r--r-- | MarkdownEditor/MainWindow.xaml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/MarkdownEditor/MainWindow.xaml b/MarkdownEditor/MainWindow.xaml new file mode 100644 index 0000000..f15d489 --- /dev/null +++ b/MarkdownEditor/MainWindow.xaml @@ -0,0 +1,61 @@ +<Window x:Class="MarkdownEditor.MainWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:local="clr-namespace:MarkdownEditor" + xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" + mc:Ignorable="d" + Title="MarkdownEditor - a basic markdown viewer and editor" Height="720" Width="1280" Background="#FF2A2D31" + Closing="Window_Closing" Icon="/icon_markdowneditor.png" Foreground="White"> + <Window.Resources> + <ResourceDictionary Source="ResourceDictionary.xaml" /> + </Window.Resources> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="38"/> + <RowDefinition /> + </Grid.RowDefinitions> + + <Button Name="saveBtn" Margin="10,10,0,0" Width="28" Click="saveBtn_Click" Padding="0" ToolTip="Save">💾</Button> + <Button Name="saveAsBtn" Margin="43,10,0,0" Width="28" Padding="0" ToolTip="Save As" Click="saveAsBtn_Click"> + <Button.Foreground> + <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}"/> + </Button.Foreground> 💾 + </Button> + <Button Name="exportBtn" Margin="76,10,0,0" Width="28" Click="exportBtn_Click" FontSize="15" Padding="0" ToolTip="Export to HTML">📤</Button> + <Button Name="openBtn" Margin="109,10,0,0" Width="28" Click="openBtn_Click" Padding="0" ToolTip="Open File">📂</Button> + <Button Name="openFolderBtn" Margin="142,10,0,0" Width="28" Padding="0" ToolTip="Open Folder" Click="openFolderBtn_Click">🗃️</Button> + <Button Name="aboutBtn" Margin="0,10,10,0" Width="28" Padding="0" ToolTip="About" HorizontalAlignment="Right" FontSize="18" FontWeight="Bold" Click="aboutBtn_Click">i</Button> + + <Grid Grid.Row="1" Grid.ColumnSpan="2"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="300"/> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + + <ScrollViewer Margin="10, 32, 5, 47" VerticalScrollBarVisibility="Auto"> + <ItemsControl Name="filePanel" Background="#FF474850" Grid.Column="0" Padding="10" BorderThickness="0"> + <ItemsControl.Resources> + <Style TargetType="Border"> + <Setter Property="CornerRadius" Value="5" /> + </Style> + </ItemsControl.Resources> + </ItemsControl> + </ScrollViewer> + <TextBlock HorizontalAlignment="Center" VerticalAlignment="Top" Grid.Column="0" FontWeight="Bold" Margin="10,5,10,10">Opened Files</TextBlock> + <Button Name="clearBtn" Width="285" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="10, 5, 5, 10" Click="clearBtn_Click">Clear Items</Button> + + <TextBlock Name="pathTxt" HorizontalAlignment="Center" VerticalAlignment="Top" Grid.Column="1" FontWeight="Bold" Margin="10,5,10,10">C:\path\to\file</TextBlock> + <TextBox Name="txtRaw" AcceptsTab="True" AcceptsReturn="True" Margin="5, 32, 5, 10" Padding="10" FontFamily="Consolas" FontSize="16" Background="#FF474850" Foreground="White" BorderThickness="0" Grid.Column="1" TextWrapping="Wrap"> + <TextBox.Resources> + <Style TargetType="Border"> + <Setter Property="CornerRadius" Value="5"/> + </Style> + </TextBox.Resources> + </TextBox> + <cef:ChromiumWebBrowser Name="browser" Margin="10, 5, 10, 10" Grid.Column="2" /> + </Grid> + </Grid> +</Window> |
