Filtration/Filtration/Views/MainWindow.xaml
Ben 3a628df744 Fixed single line script description bug
Style tweaks inc. block selection style
2015-06-28 22:46:29 +01:00

108 lines
9.7 KiB
XML

<fluent:RibbonWindow x:Class="Filtration.Views.MainWindow"
x:ClassModifier="internal"
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:fluent="clr-namespace:Fluent;assembly=Fluent"
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
xmlns:viewsAvalonDock="clr-namespace:Filtration.Views.AvalonDock"
xmlns:converters="clr-namespace:Filtration.Converters"
xmlns:views="clr-namespace:Filtration.Views"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:MainWindowViewModel}"
Title="{Binding WindowTitle}" Height="768" Width="1100" BorderThickness="1" BorderBrush="Black" IsIconVisible="True" >
<fluent:RibbonWindow.InputBindings>
<KeyBinding Command="{Binding SaveCommand}" Modifiers="Control" Key="S" />
<KeyBinding Command="{Binding OpenScriptCommand}" Modifiers="Control" Key="O" />
</fluent:RibbonWindow.InputBindings>
<fluent:RibbonWindow.Resources>
<converters:BooleanVisibilityConverterCopy x:Key="BooleanVisibilityConverterCopy" />
</fluent:RibbonWindow.Resources>
<DockPanel x:Name="RootDockPanel">
<fluent:Ribbon DockPanel.Dock="Top">
<fluent:Ribbon.Menu>
<fluent:Backstage>
<fluent:BackstageTabControl>
<fluent:BackstageTabItem Header="Filtration" Content="{StaticResource SettingsIcon}">
<fluent:BackstageTabItem.ContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Margin="20">One day there will be something here! Maybe recent documents or something? For now here's a picture of Doge:</TextBlock>
<Image Source="/Filtration;component/Resources/Images/doge.jpg" Margin="20" Width="300" Height="300" />
</StackPanel>
</DataTemplate>
</fluent:BackstageTabItem.ContentTemplate>
</fluent:BackstageTabItem>
<fluent:Button Header="New Script" Command="{Binding NewScriptCommand}" Icon="{StaticResource NewIcon}" />
<fluent:Button Header="Open Script" Command="{Binding OpenScriptCommand}" Icon="{StaticResource OpenIcon}" />
<fluent:Button Header="Open Theme" Command="{Binding OpenThemeCommand}" Icon="{StaticResource OpenIcon}" />
<fluent:Button Header="Save" Command="{Binding SaveCommand}" Icon="{StaticResource SaveIcon}" />
<fluent:Button Header="Save As" Command="{Binding SaveAsCommand}" Icon="{StaticResource SaveIcon}" />
<fluent:Button Header="Close" Command="{Binding CloseCommand}" />
<fluent:SeparatorTabItem />
<fluent:BackstageTabItem Header="Settings" Content="{StaticResource SettingsIcon}">
<fluent:BackstageTabItem.ContentTemplate>
<DataTemplate>
<views:SettingsPageView DataContext="{Binding ElementName=RootDockPanel, Path=DataContext.SettingsPageViewModel}" />
</DataTemplate>
</fluent:BackstageTabItem.ContentTemplate>
</fluent:BackstageTabItem>
<fluent:SeparatorTabItem />
<fluent:Button Header="About Filtration" Icon="{StaticResource AboutIcon}" Command="{Binding OpenAboutWindowCommand}" VerticalAlignment="Bottom" />
</fluent:BackstageTabControl>
</fluent:Backstage>
</fluent:Ribbon.Menu>
<fluent:Ribbon.ContextualGroups>
<fluent:RibbonContextualTabGroup Header="Script Tools"
Background="ForestGreen"
BorderBrush="ForestGreen"
x:Name="ScriptToolsGroup"
Visibility="{Binding ActiveDocumentIsScript, Converter={StaticResource BooleanVisibilityConverterCopy}, ConverterParameter={x:Static Visibility.Hidden}, Mode=OneWay}" />
</fluent:Ribbon.ContextualGroups>
<fluent:RibbonTabItem Header="Script Tools" Group="{Binding ElementName=ScriptToolsGroup}" >
<fluent:RibbonGroupBox Header="Clipboard">
<fluent:Button Header="Copy Block" Command="{Binding CopyBlockCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource CopyIcon}">
</fluent:Button>
<fluent:Button Header="Paste Block" Command="{Binding PasteCommand}" Icon="{StaticResource PasteIcon}" LargeIcon="{StaticResource PasteIcon}" />
<fluent:Button Header="Copy Style" Command="{Binding CopyBlockStyleCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource CopyIcon}" SizeDefinition="Middle" />
<fluent:Button Header="Paste Style" Command="{Binding PasteBlockStyleCommand}" Icon="{StaticResource PasteStyleIcon}" LargeIcon="{StaticResource PasteIcon}" SizeDefinition="Middle" />
<fluent:Button Header="Copy Script" Command="{Binding CopyScriptCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource PasteIcon}" SizeDefinition="Middle" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Blocks">
<fluent:Button Header="Add Block" Command="{Binding AddBlockCommand}" SizeDefinition="Middle" Icon="{StaticResource AddBlockIcon}" />
<fluent:Button Header="Add Section" Command="{Binding AddSectionCommand}" SizeDefinition="Middle" Icon="{StaticResource AddSectionIcon}" />
<fluent:Button Header="Delete Block" Command="{Binding DeleteBlockCommand}" SizeDefinition="Middle" Icon="{StaticResource DeleteIcon}" />
<fluent:Button Header="Move To Top" Command="{Binding MoveBlockToTopCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveToTopIcon}" />
<fluent:Button Header="Move Up" Command="{Binding MoveBlockUpCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveUpIcon}" />
<fluent:Button Header="Move Down" Command="{Binding MoveBlockDownCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveDownIcon}" />
<fluent:Button Header="Move To Bottom" Command="{Binding MoveBlockToBottomCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveToBottomIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Expand / Collapse">
<fluent:Button Header="Expand All" Command="{Binding ExpandAllBlocksCommand}" SizeDefinition="Middle" Icon="{StaticResource ExpandIcon}" />
<fluent:Button Header="Collapse All" Command="{Binding CollapseAllBlocksCommand}" SizeDefinition="Middle" Icon="{StaticResource CollapseIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Filters">
<fluent:ToggleButton Command="{Binding ToggleShowAdvancedCommand}" CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}" Header="Show Advanced Blocks" SizeDefinition="Middle" Icon="{StaticResource ShowAdvancedIcon}" IsChecked="{Binding ShowAdvancedStatus, Mode=OneWay}" />
<fluent:Button Header="Clear All Filters" Command="{Binding ClearFiltersCommand}" SizeDefinition="Middle" Icon="{StaticResource ClearFilterIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Themes">
<fluent:Button Header="Apply Theme" Command="{Binding ApplyThemeToScriptCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
<fluent:Button Header="Create Theme" Command="{Binding CreateThemeCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
<fluent:Button Header="Replace Colours" Command="{Binding ReplaceColorsCommand}" Icon="{StaticResource ReplaceColorsIcon}" LargeIcon="{StaticResource ReplaceColorsIcon}" />
</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
<fluent:RibbonTabItem Header="View">
<fluent:RibbonGroupBox Header="Tools">
<fluent:ToggleButton Header="Section Browser" SizeDefinition="Middle" Icon="{StaticResource AddSectionIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.SectionBrowserViewModel.IsVisible}" />
<fluent:ToggleButton Header="Block Group Browser" SizeDefinition="Middle" Icon="{StaticResource BlockGroupBrowserIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockGroupBrowserViewModel.IsVisible}" />
<fluent:ToggleButton Header="Block Output Preview" SizeDefinition="Middle" Icon="{StaticResource BlockOutputPreviewIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockOutputPreviewViewModel.IsVisible}" />
</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
</fluent:Ribbon>
<Grid>
<viewsAvalonDock:AvalonDockWorkspaceView DataContext="{Binding AvalonDockWorkspaceViewModel}" />
</Grid>
</DockPanel>
</fluent:RibbonWindow>