|
@@ -0,0 +1,84 @@
|
|
|
|
+<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
+ 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:cmds="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands.XAML"
|
|
|
|
+ xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
|
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
+ x:Class="PixiEditor.AvaloniaUI.Views.Main.Tools.Toolbar">
|
|
|
|
+ <StackPanel
|
|
|
|
+ Background="{DynamicResource ThemeBackgroundBrush1}"
|
|
|
|
+ Orientation="Horizontal"
|
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
|
+ Grid.Column="0"
|
|
|
|
+ Grid.Row="1">
|
|
|
|
+ <Button
|
|
|
|
+ Margin="1,0,0,0"
|
|
|
|
+ Command="{cmds:Command PixiEditor.Undo.Undo}"
|
|
|
|
+ ui:Translator.TooltipKey="UNDO"
|
|
|
|
+ Classes="ToolSettingsGlyphButton"
|
|
|
|
+ Content=""/>
|
|
|
|
+ <Button
|
|
|
|
+ Command="{cmds:Command PixiEditor.Undo.Redo}"
|
|
|
|
+ ui:Translator.TooltipKey="REDO"
|
|
|
|
+ Classes="ToolSettingsGlyphButton"
|
|
|
|
+ Content=""/>
|
|
|
|
+ <ToggleButton
|
|
|
|
+ Width="30"
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ ui:Translator.TooltipKey="PEN_MODE"
|
|
|
|
+ Focusable="False"
|
|
|
|
+ IsChecked="{Binding StylusSubViewModel.IsPenModeEnabled}">
|
|
|
|
+ <ToggleButton.Styles>
|
|
|
|
+ <Style Selector="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>
|
|
|
|
+ <!--TODO: Implement-->
|
|
|
|
+ <!--<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.Styles>
|
|
|
|
+ <Image Height="20" Source="/Images/penMode.png"/>
|
|
|
|
+ </ToggleButton>
|
|
|
|
+ <Grid Margin="5,5,10,5" Background="{StaticResource BrighterAccentColor}" Width="5"/>
|
|
|
|
+ <Label Classes="BaseLabel" FontSize="12"
|
|
|
|
+ VerticalAlignment="Center" ui:Translator.Key="{Binding ToolsSubViewModel.ActiveTool.DisplayName.Key}"
|
|
|
|
+ ui:Translator.TooltipLocalizedString="{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
|
|
|
|
+ IsVisible="{Binding HasLabel}"
|
|
|
|
+ Foreground="White" ui:Translator.Key="{Binding Label.Key}" />
|
|
|
|
+ <ContentControl Content="{Binding SettingControl}" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </DataTemplate>
|
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
|
+ </ItemsControl>
|
|
|
|
+ </StackPanel>
|
|
|
|
+</UserControl>
|