|
@@ -135,10 +135,10 @@
|
|
|
Source="/Images/PixiEditorLogo.png"
|
|
|
Width="20"
|
|
|
Height="20"
|
|
|
- Margin="5,5,0,0" />
|
|
|
+ Margin="5,2,0,0" />
|
|
|
<cmds:Menu
|
|
|
WindowChrome.IsHitTestVisibleInChrome="True"
|
|
|
- Margin="10, 4, 0, 0"
|
|
|
+ Margin="10, 0, 0, 0"
|
|
|
DockPanel.Dock="Left"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Top"
|
|
@@ -413,253 +413,246 @@
|
|
|
<Button
|
|
|
Margin="1,0,0,0"
|
|
|
Command="{cmds:Command PixiEditor.Undo.Undo}"
|
|
|
- ToolTip="Undo"
|
|
|
- Style="{StaticResource ToolSettingsGlyphButton}"
|
|
|
- Content="" />
|
|
|
- <Button
|
|
|
- Command="{cmds:Command PixiEditor.Undo.Redo}"
|
|
|
- ToolTip="Redo"
|
|
|
- Style="{StaticResource ToolSettingsGlyphButton}"
|
|
|
- Content="" />
|
|
|
- <ToggleButton
|
|
|
- Width="30"
|
|
|
- BorderThickness="0"
|
|
|
- ToolTip="Pen Mode"
|
|
|
- Focusable="False"
|
|
|
- IsChecked="{Binding StylusSubViewModel.IsPenModeEnabled}">
|
|
|
- <ToggleButton.Style>
|
|
|
- <Style
|
|
|
- TargetType="ToggleButton">
|
|
|
- <Setter
|
|
|
- Property="Template">
|
|
|
- <Setter.Value>
|
|
|
- <ControlTemplate
|
|
|
- TargetType="ToggleButton">
|
|
|
- <Border
|
|
|
- BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
- Background="{TemplateBinding Background}"
|
|
|
- Focusable="False">
|
|
|
- <ContentPresenter
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Focusable="False" />
|
|
|
- </Border>
|
|
|
- </ControlTemplate>
|
|
|
- </Setter.Value>
|
|
|
- </Setter>
|
|
|
- <Style.Triggers>
|
|
|
- <Trigger
|
|
|
- Property="IsChecked"
|
|
|
- Value="False">
|
|
|
- <Setter
|
|
|
- Property="Background"
|
|
|
- Value="Transparent" />
|
|
|
- </Trigger>
|
|
|
- <Trigger
|
|
|
- Property="IsMouseOver"
|
|
|
- Value="True">
|
|
|
- <Setter
|
|
|
- Property="Background"
|
|
|
- Value="#404040" />
|
|
|
- </Trigger>
|
|
|
- <Trigger
|
|
|
- Property="IsChecked"
|
|
|
- Value="True">
|
|
|
- <Setter
|
|
|
- Property="Background"
|
|
|
- Value="#707070" />
|
|
|
- </Trigger>
|
|
|
- </Style.Triggers>
|
|
|
- </Style>
|
|
|
- </ToggleButton.Style>
|
|
|
- <Image
|
|
|
- Height="20"
|
|
|
- Source="../Images/penMode.png" />
|
|
|
- </ToggleButton>
|
|
|
- <Grid
|
|
|
- Margin="5,5,10,5"
|
|
|
- Background="{StaticResource BrighterAccentColor}"
|
|
|
- Width="5" />
|
|
|
- <Label
|
|
|
- Style="{StaticResource BaseLabel}"
|
|
|
- FontSize="12"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Content="{Binding ToolsSubViewModel.ActiveTool.DisplayName}"
|
|
|
- ToolTip="{Binding ToolsSubViewModel.ActiveTool.ActionDisplay}" />
|
|
|
- <ItemsControl
|
|
|
- ItemsSource="{Binding ToolsSubViewModel.ActiveTool.Toolbar.Settings}">
|
|
|
- <ItemsControl.ItemsPanel>
|
|
|
- <ItemsPanelTemplate>
|
|
|
- <StackPanel
|
|
|
- Orientation="Horizontal"
|
|
|
- Margin="10, 0, 0, 0" />
|
|
|
- </ItemsPanelTemplate>
|
|
|
- </ItemsControl.ItemsPanel>
|
|
|
- <ItemsControl.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <StackPanel
|
|
|
- Orientation="Horizontal"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Margin="10,0,10,0">
|
|
|
- <Label
|
|
|
- Visibility="{Binding HasLabel, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
|
- Foreground="White"
|
|
|
- Content="{Binding Label}" />
|
|
|
- <ContentControl
|
|
|
- Content="{Binding SettingControl}" />
|
|
|
- </StackPanel>
|
|
|
- </DataTemplate>
|
|
|
- </ItemsControl.ItemTemplate>
|
|
|
- </ItemsControl>
|
|
|
- </StackPanel>
|
|
|
- <Grid
|
|
|
- Grid.Column="1"
|
|
|
- Grid.Row="2"
|
|
|
- Background="#303030">
|
|
|
- <Grid
|
|
|
- AllowDrop="True"
|
|
|
- Drop="MainWindow_Drop">
|
|
|
- <DockingManager
|
|
|
- ActiveContent="{Binding BitmapManager.ActiveWindow, Mode=TwoWay}"
|
|
|
- DocumentsSource="{Binding BitmapManager.Documents}">
|
|
|
- <DockingManager.Theme>
|
|
|
- <avalonDockTheme:PixiEditorDockTheme />
|
|
|
- </DockingManager.Theme>
|
|
|
+ ToolTip="Undo"Style="{StaticResource ToolSettingsGlyphButton}"
|
|
|
+ Content=""/>
|
|
|
+ <Button
|
|
|
+ Command="{cmds:Command PixiEditor.Undo.Redo}"
|
|
|
+ ToolTip="Redo"
|
|
|
+ Style="{StaticResource ToolSettingsGlyphButton}"
|
|
|
+ Content=""/>
|
|
|
+ <ToggleButton
|
|
|
+ Width="30"
|
|
|
+ BorderThickness="0"
|
|
|
+ ToolTip="Pen Mode"
|
|
|
+ Focusable="False"
|
|
|
+ IsChecked="{Binding StylusSubViewModel.IsPenModeEnabled}">
|
|
|
+ <ToggleButton.Style>
|
|
|
+ <Style TargetType="ToggleButton">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="ToggleButton">
|
|
|
+ <Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ Background="{TemplateBinding Background}" Focusable="False">
|
|
|
+ <ContentPresenter HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" Focusable="False"/>
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="IsChecked" Value="False">
|
|
|
+ <Setter Property="Background" Value="Transparent"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="#404040"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter Property="Background" Value="#707070"/>
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </ToggleButton.Style>
|
|
|
+ <Image Height="20" Source="../Images/penMode.png"/>
|
|
|
+ </ToggleButton>
|
|
|
+ <Grid Margin="5,5,10,5" Background="{StaticResource BrighterAccentColor}" Width="5"/>
|
|
|
+ <Label Style="{StaticResource BaseLabel}" FontSize="12"
|
|
|
+ VerticalAlignment="Center" Content="{Binding ToolsSubViewModel.ActiveTool.DisplayName}"
|
|
|
+ ToolTip="{Binding ToolsSubViewModel.ActiveTool.ActionDisplay}"/>
|
|
|
+ <ItemsControl ItemsSource="{Binding ToolsSubViewModel.ActiveTool.Toolbar.Settings}">
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="10, 0, 0, 0" />
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="10,0,10,0">
|
|
|
+ <Label
|
|
|
+ Visibility="{Binding HasLabel, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
|
+ Foreground="White" Content="{Binding Label}" />
|
|
|
+ <ContentControl Content="{Binding SettingControl}" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </StackPanel>
|
|
|
+ <Grid Grid.Column="1" Grid.Row="2" Background="#303030" >
|
|
|
+ <Grid AllowDrop="True" Drop="MainWindow_Drop">
|
|
|
+ <DockingManager ActiveContent="{Binding BitmapManager.ActiveWindow, Mode=TwoWay}"
|
|
|
+ DocumentsSource="{Binding BitmapManager.Documents}">
|
|
|
+ <DockingManager.Theme>
|
|
|
+ <avalonDockTheme:PixiEditorDockTheme />
|
|
|
+ </DockingManager.Theme>
|
|
|
|
|
|
- <avalondock:DockingManager.LayoutItemContainerStyleSelector>
|
|
|
- <ui:PanelsStyleSelector>
|
|
|
- <ui:PanelsStyleSelector.DocumentTabStyle>
|
|
|
- <Style
|
|
|
- TargetType="{x:Type avalondock:LayoutItem}">
|
|
|
- <Setter
|
|
|
- Property="Title"
|
|
|
- Value="{Binding Model.Name}" />
|
|
|
- <Setter
|
|
|
- Property="CloseCommand"
|
|
|
- Value="{Binding Model.RequestCloseDocumentCommand}" />
|
|
|
- </Style>
|
|
|
- </ui:PanelsStyleSelector.DocumentTabStyle>
|
|
|
- </ui:PanelsStyleSelector>
|
|
|
- </avalondock:DockingManager.LayoutItemContainerStyleSelector>
|
|
|
- <DockingManager.LayoutItemTemplateSelector>
|
|
|
- <ui:DocumentsTemplateSelector>
|
|
|
- <ui:DocumentsTemplateSelector.DocumentsViewTemplate>
|
|
|
- <DataTemplate
|
|
|
- DataType="{x:Type dataHolders:Document}">
|
|
|
- <usercontrols:DrawingViewPort
|
|
|
- CenterViewportTrigger="{Binding CenterViewportTrigger}"
|
|
|
- ZoomViewportTrigger="{Binding ZoomViewportTrigger}"
|
|
|
- GridLinesVisible="{Binding XamlAccesibleViewModel.ViewportSubViewModel.GridLinesEnabled}"
|
|
|
- Cursor="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ToolCursor}"
|
|
|
- MiddleMouseClickedCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.PreviewMouseMiddleButtonCommand}"
|
|
|
- MouseMoveCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseMoveCommand}"
|
|
|
- MouseDownCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseDownCommand}"
|
|
|
- MouseUpCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseUpCommand}"
|
|
|
- MouseXOnCanvas="{Binding MouseXOnCanvas, Mode=TwoWay}"
|
|
|
- MouseYOnCanvas="{Binding MouseYOnCanvas, Mode=TwoWay}"
|
|
|
- StylusButtonDownCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusDownCommand}"
|
|
|
- StylusButtonUpCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusUpCommand}"
|
|
|
- StylusGestureCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusGestureCommand}"
|
|
|
- StylusOutOfRangeCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusOutOfRangeCommand}"
|
|
|
- UseTouchGestures="{Binding XamlAccesibleViewModel.StylusSubViewModel.UseTouchGestures}"
|
|
|
- IsUsingZoomTool="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ActiveTool, Converter={converters:IsSpecifiedTypeConverter SpecifiedType={x:Type tools:ZoomTool}}}"
|
|
|
- IsUsingMoveViewportTool="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ActiveTool, Converter={converters:IsSpecifiedTypeConverter SpecifiedType={x:Type tools:MoveViewportTool}}}"
|
|
|
- Stylus.IsTapFeedbackEnabled="False"
|
|
|
- Stylus.IsTouchFeedbackEnabled="False">
|
|
|
- <i:Interaction.Triggers>
|
|
|
- <i:EventTrigger
|
|
|
- EventName="PreviewMouseDown">
|
|
|
- <i:InvokeCommandAction
|
|
|
- Command="{Binding SetAsActiveOnClickCommand}" />
|
|
|
- </i:EventTrigger>
|
|
|
- </i:Interaction.Triggers>
|
|
|
- <usercontrols:DrawingViewPort.ContextMenu>
|
|
|
- <cmds:ContextMenu>
|
|
|
- <MenuItem
|
|
|
- Header="_Select All"
|
|
|
- cmds:ContextMenu.Command="PixiEditor.Selection.SelectAll" />
|
|
|
- <MenuItem
|
|
|
- Header="_Deselect"
|
|
|
- cmds:ContextMenu.Command="PixiEditor.Selection.Clear" />
|
|
|
- <Separator />
|
|
|
- <MenuItem
|
|
|
- Header="_Cut"
|
|
|
- cmds:ContextMenu.Command="PixiEditor.Clipboard.Cut" />
|
|
|
- <MenuItem
|
|
|
- Header="_Copy"
|
|
|
- cmds:ContextMenu.Command="PixiEditor.Clipboard.Copy" />
|
|
|
- <MenuItem
|
|
|
- Header="_Paste"
|
|
|
- cmds:ContextMenu.Command="PixiEditor.Clipboard.Paste" />
|
|
|
- </cmds:ContextMenu>
|
|
|
- </usercontrols:DrawingViewPort.ContextMenu>
|
|
|
- </usercontrols:DrawingViewPort>
|
|
|
- </DataTemplate>
|
|
|
- </ui:DocumentsTemplateSelector.DocumentsViewTemplate>
|
|
|
- </ui:DocumentsTemplateSelector>
|
|
|
- </DockingManager.LayoutItemTemplateSelector>
|
|
|
- <avalondock:LayoutRoot
|
|
|
- x:Name="LayoutRoot">
|
|
|
- <LayoutPanel
|
|
|
- Orientation="Horizontal">
|
|
|
- <LayoutDocumentPane />
|
|
|
- <LayoutAnchorablePaneGroup
|
|
|
- Orientation="Vertical"
|
|
|
- DockWidth="290">
|
|
|
+ <avalondock:DockingManager.LayoutItemContainerStyleSelector>
|
|
|
+ <ui:PanelsStyleSelector>
|
|
|
+ <ui:PanelsStyleSelector.DocumentTabStyle>
|
|
|
+ <Style TargetType="{x:Type avalondock:LayoutItem}">
|
|
|
+ <Setter Property="Title" Value="{Binding Model.Name}" />
|
|
|
+ <Setter Property="CloseCommand" Value="{Binding Model.RequestCloseDocumentCommand}" />
|
|
|
+ </Style>
|
|
|
+ </ui:PanelsStyleSelector.DocumentTabStyle>
|
|
|
+ </ui:PanelsStyleSelector>
|
|
|
+ </avalondock:DockingManager.LayoutItemContainerStyleSelector>
|
|
|
+ <DockingManager.LayoutItemTemplateSelector>
|
|
|
+ <ui:DocumentsTemplateSelector>
|
|
|
+ <ui:DocumentsTemplateSelector.DocumentsViewTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type dataHolders:Document}">
|
|
|
+ <usercontrols:DrawingViewPort
|
|
|
+ CenterViewportTrigger="{Binding CenterViewportTrigger}"
|
|
|
+ ZoomViewportTrigger="{Binding ZoomViewportTrigger}"
|
|
|
+ GridLinesVisible="{Binding XamlAccesibleViewModel.ViewportSubViewModel.GridLinesEnabled}"
|
|
|
+ Cursor="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ToolCursor}"
|
|
|
+ MiddleMouseClickedCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.PreviewMouseMiddleButtonCommand}"
|
|
|
+ MouseMoveCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseMoveCommand}"
|
|
|
+ MouseDownCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseDownCommand}"
|
|
|
+ MouseUpCommand="{Binding XamlAccesibleViewModel.IoSubViewModel.MouseUpCommand}"
|
|
|
+ MouseXOnCanvas="{Binding MouseXOnCanvas, Mode=TwoWay}"
|
|
|
+ MouseYOnCanvas="{Binding MouseYOnCanvas, Mode=TwoWay}"
|
|
|
+ StylusButtonDownCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusDownCommand}"
|
|
|
+ StylusButtonUpCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusUpCommand}"
|
|
|
+ StylusGestureCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusGestureCommand}"
|
|
|
+ StylusOutOfRangeCommand="{Binding XamlAccesibleViewModel.StylusSubViewModel.StylusOutOfRangeCommand}"
|
|
|
+ UseTouchGestures="{Binding XamlAccesibleViewModel.StylusSubViewModel.UseTouchGestures}"
|
|
|
+ IsUsingZoomTool="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ActiveTool, Converter={converters:IsSpecifiedTypeConverter SpecifiedType={x:Type tools:ZoomTool}}}"
|
|
|
+ IsUsingMoveViewportTool="{Binding XamlAccesibleViewModel.ToolsSubViewModel.ActiveTool, Converter={converters:IsSpecifiedTypeConverter SpecifiedType={x:Type tools:MoveViewportTool}}}"
|
|
|
+ Stylus.IsTapFeedbackEnabled="False" Stylus.IsTouchFeedbackEnabled="False">
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="PreviewMouseDown">
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetAsActiveOnClickCommand}"/>
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ <usercontrols:DrawingViewPort.ContextMenu>
|
|
|
+ <ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
|
|
+ <ContextMenu.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border Height="120" Background="{StaticResource AccentColor}" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="100"/>
|
|
|
+ <ColumnDefinition Width="{Binding XamlAccesibleViewModel.BitmapManager.ActiveDocument.Palette, Converter={converters:PaletteItemsToWidthConverter}}"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Border BorderThickness="0 0 1 0" BorderBrush="Black">
|
|
|
+ <StackPanel Orientation="Vertical" Grid.Column="0">
|
|
|
+ <MenuItem
|
|
|
+ Header="_Select All"
|
|
|
+ cmds:ContextMenu.Command="PixiEditor.Selection.SelectAll" />
|
|
|
+ <MenuItem
|
|
|
+ Header="_Deselect"
|
|
|
+ cmds:ContextMenu.Command="PixiEditor.Selection.Clear" />
|
|
|
+ <Separator />
|
|
|
+ <MenuItem
|
|
|
+ Header="_Cut"
|
|
|
+ cmds:ContextMenu.Command="PixiEditor.Clipboard.Cut" />
|
|
|
+ <MenuItem
|
|
|
+ Header="_Copy"
|
|
|
+ cmds:ContextMenu.Command="PixiEditor.Clipboard.Copy" />
|
|
|
+ <MenuItem
|
|
|
+ Header="_Paste"
|
|
|
+ cmds:ContextMenu.Command="PixiEditor.Clipboard.Paste" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ScrollViewer Margin="5" Grid.Column="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
|
+ <ItemsControl ItemsSource="{Binding XamlAccesibleViewModel.BitmapManager.ActiveDocument.Palette}" AlternationCount="9999">
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <WrapPanel Orientation="Horizontal"
|
|
|
+ HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <palettes:PaletteColor Cursor="Hand" CornerRadius="0" ToolTip="Click to select as main color." Width="22" Height="22" Color="{Binding}">
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="MouseLeftButtonUp">
|
|
|
+ <b:InvokeCommandAction
|
|
|
+ Command="{Binding DataContext.XamlAccesibleViewModel.ColorsSubViewModel.SelectColorCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}}"
|
|
|
+ CommandParameter="{Binding}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+ </palettes:PaletteColor>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </ScrollViewer>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </ContextMenu.Template>
|
|
|
+ </ContextMenu>
|
|
|
+ </usercontrols:DrawingViewPort.ContextMenu>
|
|
|
+ </usercontrols:DrawingViewPort>
|
|
|
+ </DataTemplate>
|
|
|
+ </ui:DocumentsTemplateSelector.DocumentsViewTemplate>
|
|
|
+ </ui:DocumentsTemplateSelector>
|
|
|
+ </DockingManager.LayoutItemTemplateSelector>
|
|
|
+ <avalondock:LayoutRoot x:Name="LayoutRoot">
|
|
|
+ <LayoutPanel Orientation="Horizontal">
|
|
|
+ <LayoutDocumentPane/>
|
|
|
+ <LayoutAnchorablePaneGroup Orientation="Vertical" DockWidth="290">
|
|
|
|
|
|
- <LayoutAnchorablePane
|
|
|
- x:Name="colorPane">
|
|
|
- <LayoutAnchorable
|
|
|
- ContentId="colorPicker"
|
|
|
- Title="Color Picker"
|
|
|
- CanHide="False"
|
|
|
- CanClose="False"
|
|
|
- CanAutoHide="False"
|
|
|
- x:Name="colorPickerPanel"
|
|
|
- CanDockAsTabbedDocument="False"
|
|
|
- CanFloat="True">
|
|
|
- <usercontrols:SmallColorPicker
|
|
|
- SelectedColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay, Converter={StaticResource SKColorToMediaColorConverter}}"
|
|
|
- SecondaryColor="{Binding ColorsSubViewModel.SecondaryColor, Mode=TwoWay, Converter={StaticResource SKColorToMediaColorConverter}}"
|
|
|
- Style="{StaticResource DefaultColorPickerStyle}"
|
|
|
- x:Name="mainColorPicker">
|
|
|
- <i:Interaction.Behaviors>
|
|
|
- <behaviours:GlobalShortcutFocusBehavior />
|
|
|
- </i:Interaction.Behaviors>
|
|
|
- </usercontrols:SmallColorPicker>
|
|
|
- </LayoutAnchorable>
|
|
|
- <LayoutAnchorable
|
|
|
- ContentId="colorSliders"
|
|
|
- Title="Color Sliders"
|
|
|
- CanHide="False"
|
|
|
- CanClose="False"
|
|
|
- CanAutoHide="False"
|
|
|
- x:Name="colorSlidersPanel"
|
|
|
- CanDockAsTabbedDocument="False"
|
|
|
- CanFloat="True">
|
|
|
- <colorpicker:ColorSliders
|
|
|
- Style="{StaticResource DefaultColorPickerStyle}"
|
|
|
- ColorState="{Binding ElementName=mainColorPicker, Path=ColorState, Delay=10, Mode=TwoWay}">
|
|
|
- <i:Interaction.Behaviors>
|
|
|
- <behaviours:GlobalShortcutFocusBehavior />
|
|
|
- </i:Interaction.Behaviors>
|
|
|
- </colorpicker:ColorSliders>
|
|
|
- </LayoutAnchorable>
|
|
|
- <avalondock:LayoutAnchorable
|
|
|
- ContentId="swatches"
|
|
|
- Title="Swatches"
|
|
|
- CanHide="False"
|
|
|
- CanClose="False"
|
|
|
- CanAutoHide="False"
|
|
|
- CanDockAsTabbedDocument="False"
|
|
|
- CanFloat="True">
|
|
|
- <usercontrols:SwatchesView
|
|
|
- SelectSwatchCommand="{cmds:Command PixiEditor.Colors.SelectColor, UseProvided=True}"
|
|
|
- RemoveSwatchCommand="{cmds:Command PixiEditor.Colors.RemoveSwatch, UseProvided=True}"
|
|
|
- Swatches="{Binding BitmapManager.ActiveDocument.Swatches}" />
|
|
|
- </avalondock:LayoutAnchorable>
|
|
|
- </LayoutAnchorablePane>
|
|
|
- <LayoutAnchorablePane>
|
|
|
+ <LayoutAnchorablePane x:Name="colorPane">
|
|
|
+ <LayoutAnchorable ContentId="colorPicker" Title="Color Picker" CanHide="False"
|
|
|
+ CanClose="False" CanAutoHide="False" x:Name="colorPickerPanel"
|
|
|
+ CanDockAsTabbedDocument="False" CanFloat="True">
|
|
|
+ <usercontrols:SmallColorPicker SelectedColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay, Converter={StaticResource SKColorToMediaColorConverter}}"
|
|
|
+ SecondaryColor="{Binding ColorsSubViewModel.SecondaryColor, Mode=TwoWay, Converter={StaticResource SKColorToMediaColorConverter}}"
|
|
|
+ Style="{StaticResource DefaultColorPickerStyle}" x:Name="mainColorPicker">
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
+ <behaviours:GlobalShortcutFocusBehavior/>
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
+ </usercontrols:SmallColorPicker>
|
|
|
+ </LayoutAnchorable>
|
|
|
+ <LayoutAnchorable ContentId="colorSliders" Title="Color Sliders" CanHide="False"
|
|
|
+ CanClose="False" CanAutoHide="False" x:Name="colorSlidersPanel"
|
|
|
+ CanDockAsTabbedDocument="False" CanFloat="True">
|
|
|
+ <colorpicker:ColorSliders Style="{StaticResource DefaultColorPickerStyle}"
|
|
|
+ ColorState="{Binding ElementName=mainColorPicker, Path=ColorState, Delay=10, Mode=TwoWay}">
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
+ <behaviours:GlobalShortcutFocusBehavior/>
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
+ </colorpicker:ColorSliders>
|
|
|
+ </LayoutAnchorable>
|
|
|
+ <avalondock:LayoutAnchorable ContentId="palette" Title="Palette" CanHide="False"
|
|
|
+ CanClose="False" CanAutoHide="False" x:Name="paletteAnchorable"
|
|
|
+ CanDockAsTabbedDocument="False" CanFloat="True">
|
|
|
+ <Grid>
|
|
|
+ <palettes:CompactPaletteViewer IsEnabled="{Binding DocumentSubViewModel.Owner.BitmapManager.ActiveDocument,
|
|
|
+ Converter={converters:NotNullToBoolConverter}}"
|
|
|
+ SelectColorCommand="{Binding ColorsSubViewModel.SelectColorCommand}"
|
|
|
+ Colors="{Binding BitmapManager.ActiveDocument.Palette}"
|
|
|
+ Visibility="{Binding RelativeSource={RelativeSource Mode=Self},
|
|
|
+ Path=ActualWidth, Converter={converters:PaletteViewerWidthToVisibilityConverter}}"/>
|
|
|
+ <palettes:PaletteViewer IsEnabled="{Binding DocumentSubViewModel.Owner.BitmapManager.ActiveDocument,
|
|
|
+ Converter={converters:NotNullToBoolConverter}}" Colors="{Binding BitmapManager.ActiveDocument.Palette}"
|
|
|
+ Swatches="{Binding BitmapManager.ActiveDocument.Swatches}"
|
|
|
+ SelectColorCommand="{Binding ColorsSubViewModel.SelectColorCommand}"
|
|
|
+ HintColor="{Binding Path=ColorsSubViewModel.PrimaryColor,
|
|
|
+ Converter={converters:SKColorToMediaColorConverter}}"
|
|
|
+ DataSources="{Binding ColorsSubViewModel.PaletteDataSources}"
|
|
|
+ FileParsers="{Binding ColorsSubViewModel.PaletteParsers}"
|
|
|
+ Visibility="{Binding RelativeSource={RelativeSource Mode=Self},
|
|
|
+ Path=ActualWidth, Converter={converters:PaletteViewerWidthToVisibilityConverter},
|
|
|
+ ConverterParameter=Hidden}"
|
|
|
+ ImportPaletteCommand="{Binding ColorsSubViewModel.ImportPaletteCommand}"
|
|
|
+ ReplaceColorsCommand="{Binding ColorsSubViewModel.ReplaceColorsCommand}"/>
|
|
|
+ </Grid>
|
|
|
+ </avalondock:LayoutAnchorable>
|
|
|
+ <avalondock:LayoutAnchorable
|
|
|
+ ContentId="swatches"
|
|
|
+ Title="Swatches"
|
|
|
+ CanHide="False"
|
|
|
+ CanClose="False"
|
|
|
+ CanAutoHide="False"
|
|
|
+ CanDockAsTabbedDocument="False"
|
|
|
+ CanFloat="True">
|
|
|
+ <usercontrols:SwatchesView
|
|
|
+ SelectSwatchCommand="{cmds:Command PixiEditor.Colors.SelectColor, UseProvided=True}"
|
|
|
+ RemoveSwatchCommand="{cmds:Command PixiEditor.Colors.RemoveSwatch, UseProvided=True}"
|
|
|
+ Swatches="{Binding BitmapManager.ActiveDocument.Swatches}" />
|
|
|
+ </avalondock:LayoutAnchorable>
|
|
|
+ </LayoutAnchorablePane>
|
|
|
+ <LayoutAnchorablePane>
|
|
|
<LayoutAnchorable
|
|
|
ContentId="layers"
|
|
|
Title="Layers"
|
|
@@ -705,14 +698,14 @@
|
|
|
PrimaryColor="{Binding ColorsSubViewModel.PrimaryColor, Mode=TwoWay, Converter={StaticResource SKColorToMediaColorConverter}}" />
|
|
|
</LayoutAnchorable>
|
|
|
</LayoutAnchorablePane>
|
|
|
- </LayoutAnchorablePaneGroup>
|
|
|
- </LayoutPanel>
|
|
|
- </avalondock:LayoutRoot>
|
|
|
- </DockingManager>
|
|
|
- </Grid>
|
|
|
+ </LayoutAnchorablePaneGroup>
|
|
|
+ </LayoutPanel>
|
|
|
+ </avalondock:LayoutRoot>
|
|
|
+ </DockingManager>
|
|
|
</Grid>
|
|
|
+ </Grid>
|
|
|
|
|
|
- <Border
|
|
|
+ <Border
|
|
|
Grid.Row="2"
|
|
|
Grid.Column="0"
|
|
|
Background="{StaticResource AccentColor}"
|
|
@@ -825,4 +818,4 @@
|
|
|
Height="700"
|
|
|
MaxWidth="920" />
|
|
|
</Grid>
|
|
|
-</Window>
|
|
|
+</Window>
|