-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathEditorToolbar.xaml
59 lines (57 loc) · 3.85 KB
/
EditorToolbar.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<UserControl x:Class="EditorDemo.EditorToolbar"
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:local="clr-namespace:EditorDemo"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.Resources>
<FontFamily x:Key="calcite-font-24" >./#calcite-ui-icons-24</FontFamily>
<local:BoolToVisibilityConverter x:Key="converter" />
<Style TargetType="Button">
<Setter Property="Width" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="Margin" Value="2" />
<Setter Property="Background" Value="CornflowerBlue" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontFamily" Value="{StaticResource calcite-font-24}" />
<Setter Property="FontSize" Value="20" />
</Style>
<Style TargetType="ToggleButton">
<Setter Property="Width" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="Margin" Value="2" />
<Setter Property="Background" Value="CornflowerBlue" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontFamily" Value="{StaticResource calcite-font-24}" />
<Setter Property="FontSize" Value="20" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<Button Content="" Command="{Binding UndoCommand}" ToolTip="Undo" />
<Button Content="" Command="{Binding RedoCommand}" ToolTip="Redo" />
<Button Content="" ToolTip="Unselect" Command="{Binding ClearSelectionCommand}" />
<Button Content="" ToolTip="Delete Selection" Command="{Binding DeleteSelectionCommand}" />
<ToggleButton Content="" Command="{Binding EditVerticesCommand}" ToolTip="Edit Vertices" IsChecked="{Binding IsEditVerticesActive, Mode=OneWay}" />
<ToggleButton Content="" Command="{Binding MoveCommand}" ToolTip="Move" IsChecked="{Binding IsMoveActive, Mode=OneWay}" />
<ToggleButton Content="" Command="{Binding RotateCommand}" ToolTip="Rotate" IsChecked="{Binding IsRotateActive, Mode=OneWay}" />
<Button Content="" Command="{Binding ReshapeCommand}" ToolTip="Reshape" />
<Button Content="" Command="{Binding CutCommand}" ToolTip="Cut" />
<Button Content="" Command="{Binding ApplyCommand}" x:Name="applyButton" ToolTip="Apply Edits" />
<Button Content="" Command="{Binding DiscardCommand}" ToolTip="Discard Edits" />
</StackPanel>
<StackPanel Grid.Column="0" Orientation="Horizontal" Background="White" Visibility="{Binding IsLineInputActive, Converter={StaticResource converter}}">
<Button Content="" Command="{Binding LineInputAcceptCommand}" ToolTip="Accept" />
<Button Content="" Command="{Binding LineInputDiscardCommand}" ToolTip="Discard" />
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<ToggleButton Content="" ToolTip="Settings" x:Name="SettingsToggleButton" IsChecked="{Binding IsSettingsPanelVisible}" IsEnabled="{Binding IsEditingActive}" />
</StackPanel>
</Grid>
</UserControl>