mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-21 01:52:54 +01:00
Xaml factorisation
This commit is contained in:
1 parent
1586917a2c
commit
a28fdef080
6 files changed
+44
-83
No files matched your search
@@ -1,8 +1,50 @@
|
||||
<Application x:Class="FileConverter.Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:xaml="clr-namespace:Markdown.Xaml;assembly=Markdown.Xaml"
|
||||
xmlns:valueConverters="clr-namespace:FileConverter.ValueConverters"
|
||||
StartupUri="Windows/MainWindow.xaml" ShutdownMode="OnMainWindowClose">
|
||||
<Application.Resources>
|
||||
|
||||
<!-- Converters -->
|
||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||
|
||||
<!-- Markdown style -->
|
||||
<Style TargetType="FlowDocument" x:Key="DocumentStyle">
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="Foreground" Value="#786C71" />
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="LineHeight" Value="9"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PageHeader" TargetType="Paragraph">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Foreground" Value="#1E6BB8" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeader"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeaderSecondary"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<xaml:Markdown x:Key="Markdown"
|
||||
DocumentStyle="{StaticResource DocumentStyle}"
|
||||
Heading1Style="{StaticResource PageHeader}"
|
||||
Heading2Style="{StaticResource SubHeader}"
|
||||
Heading3Style="{StaticResource SubHeaderSecondary}"/>
|
||||
|
||||
<xaml:TextToFlowDocumentConverter x:Key="TextToFlowDocumentConverter" Markdown="{StaticResource Markdown}"/>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@@ -88,7 +88,7 @@
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="ApplicationTerminateArgs.cs" />
|
||||
<Compile Include="Commands\GetChangeLogContent.cs" />
|
||||
<Compile Include="Commands\DelegateCommand.cs" />
|
||||
<Compile Include="Commands\OpenUrlCommand.cs" />
|
||||
<Compile Include="Controls\EncodingQualitySliderControl.xaml.cs">
|
||||
<DependentUpon>EncodingQualitySliderControl.xaml</DependentUpon>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
mc:Ignorable="d"
|
||||
Height="480" Width="640" Icon="/FileConverter;component/Resources/ApplicationIcon.ico" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" ResizeMode="NoResize">
|
||||
<Window.Resources>
|
||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||
</Window.Resources>
|
||||
<Window.Title>
|
||||
<Binding Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" Path="(fileConverter:Application.ApplicationVersion)"/>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
mc:Ignorable="d" x:Class="FileConverter.MainWindow"
|
||||
x:Name="FileConverterMainWindow" Height="500" Width="950" MinHeight="250" MinWidth="500" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico">
|
||||
<Window.Resources>
|
||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||
<valueConverters:ConversionStateToBrush x:Key="ConversionStateToColor" />
|
||||
|
||||
<generic:ValueConverterGroup x:Key="EnumEqualsToVisibility">
|
||||
|
||||
@@ -84,49 +84,9 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Markdown style -->
|
||||
<Style TargetType="FlowDocument" x:Key="DocumentStyle">
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="Foreground" Value="#786C71" />
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="LineHeight" Value="9"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PageHeader" TargetType="Paragraph">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Foreground" Value="#1E6BB8" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeader"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeaderSecondary"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<xaml:Markdown x:Key="Markdown"
|
||||
DocumentStyle="{StaticResource DocumentStyle}"
|
||||
Heading1Style="{StaticResource PageHeader}"
|
||||
Heading2Style="{StaticResource SubHeader}"
|
||||
Heading3Style="{StaticResource SubHeaderSecondary}"/>
|
||||
|
||||
<xaml:TextToFlowDocumentConverter x:Key="TextToFlowDocumentConverter" Markdown="{StaticResource Markdown}"/>
|
||||
|
||||
<generic:DoubleToTimeString x:Key="DoubleToTimeString"/>
|
||||
<valueConverters:FileNameConverter x:Key="FileNameConverter"/>
|
||||
<generic:BoolToVisibility x:Key="BoolToVisibility"/>
|
||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||
<generic:CollectionContainsElementToBool x:Key="CollectionContainsElementToBool"/>
|
||||
<generic:FormatStringConverter x:Key="FormatStringConverter"/>
|
||||
|
||||
|
||||
@@ -13,45 +13,6 @@
|
||||
MinHeight="300" MinWidth="450"
|
||||
Height="450" Width="450" WindowStyle="ToolWindow">
|
||||
<Window.Resources>
|
||||
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
|
||||
|
||||
<Style TargetType="FlowDocument" x:Key="DocumentStyle">
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="Foreground" Value="#786C71" />
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="LineHeight" Value="9"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PageHeader" TargetType="Paragraph">
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Foreground" Value="#1E6BB8" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeader"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SubHeaderSecondary"
|
||||
TargetType="Paragraph">
|
||||
<Setter Property="FontSize"
|
||||
Value="20" />
|
||||
<Setter Property="Foreground"
|
||||
Value="#DF3900" />
|
||||
</Style>
|
||||
|
||||
<xaml:Markdown x:Key="Markdown"
|
||||
DocumentStyle="{StaticResource DocumentStyle}"
|
||||
Heading1Style="{StaticResource PageHeader}"
|
||||
Heading2Style="{StaticResource SubHeader}"
|
||||
Heading3Style="{StaticResource SubHeaderSecondary}"/>
|
||||
|
||||
<xaml:TextToFlowDocumentConverter x:Key="TextToFlowDocumentConverter" Markdown="{StaticResource Markdown}"/>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
Reference in new issue
Block a user