Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
73 lines (69 sloc) 3.849 kb
<UserControl
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:Document="clr-namespace:MarkPad.Document"
xmlns:Controls="clr-namespace:MarkPad.Document.Controls" xmlns:Commands="clr-namespace:MarkPad.Document.Commands"
xmlns:Converters="clr-namespace:MarkPad.Converters" x:Class="MarkPad.Document.DocumentView"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" d:DataContext="{d:DesignInstance Document:DocumentViewModel}"
x:Name="doc">
<UserControl.InputBindings>
<KeyBinding Command="Commands:DisplayCommands.ZoomIn" Key="OemPlus" Modifiers="Control"/>
<KeyBinding Command="Commands:DisplayCommands.ZoomIn" Key="Add" Modifiers="Control"/>
<KeyBinding Command="Commands:DisplayCommands.ZoomOut" Key="OemMinus" Modifiers="Control"/>
<KeyBinding Command="Commands:DisplayCommands.ZoomOut" Key="Subtract" Modifiers="Control"/>
<KeyBinding Command="Commands:DisplayCommands.ZoomReset" Key="D0" Modifiers="Control"/>
</UserControl.InputBindings>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles\Scrollbars.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition x:Name="webBrowserColumn" Width="{Binding DistractionFree, Converter={Converters:BoolToGridLengthConverter Invert=True}}" />
</Grid.ColumnDefinitions>
<Controls:SiteView SiteContext="{Binding MarkpadDocument.SiteContext}" x:Name="siteView">
<Controls:SiteView.Style>
<Style TargetType="Controls:SiteView">
<Style.Triggers>
<DataTrigger Binding="{Binding MarkpadDocument.SiteContext}"
Value="{x:Null}">
<Setter Property="Visibility"
Value="Collapsed" />
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding MarkpadDocument.SiteContext.IsLoading}" Value="False" />
<Condition Binding="{Binding MarkpadDocument.SiteContext.Items.Count}" Value="0" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Collapsed" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding DistractionFree}"
Value="True">
<Setter Property="Visibility"
Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Controls:SiteView.Style>
</Controls:SiteView>
<Controls:MarkdownEditor x:Name="markdownEditor"
Grid.Column="1"
IndentType="{Binding IndentType}"
EditorFontSize="{Binding FontSize}"
Document="{Binding Document}"
SpellCheckProvider="{Binding SpellCheckProvider}"
IsColorsInverted="{Binding IsColorsInverted}"
/>
<Border Grid.Column="2"
SizeChanged="PlaceHolderSizeChanged"
x:Name="previewPlaceHolder"
BorderThickness="0"/>
</Grid>
</UserControl>
Jump to Line
Something went wrong with that request. Please try again.