Redesigned styles editor
This commit is contained in:
Родитель
e458e3867e
Коммит
295cd4da1a
|
@ -2,9 +2,9 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Edit Styles"
|
||||
Height="514" Width="300"
|
||||
Height="514" Width="340"
|
||||
SizeToContent="Height"
|
||||
Background="LightGray"
|
||||
Background="White"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowState="Normal"
|
||||
UseLayoutRounding="True" SnapsToDevicePixels="True"
|
||||
|
@ -14,7 +14,7 @@
|
|||
<Grid>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<Expander IsExpanded="True" Header="Current Style">
|
||||
<GroupBox Header="Current Style" Margin="2">
|
||||
<Grid Margin="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
|
@ -29,15 +29,15 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander IsExpanded="True" Header="Styles">
|
||||
</GroupBox>
|
||||
<GroupBox Header="Styles" Margin="2,0,2,2">
|
||||
<StackPanel Margin="8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Style:" Margin="0,0,8,0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Name:" Margin="0,0,8,0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<ComboBox x:Name="stylesComboBox" ItemsSource="{Binding Styles}" SelectedItem="{Binding CurrentStyle, Mode=OneTime}" Grid.Column="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -46,85 +46,85 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<Grid DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}" Margin="0,8,0,0">
|
||||
<Grid DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}" Margin="0,8,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Name:" Margin="0,0,8,0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="" Margin="0,0,8,0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBox Text="{Binding Name}" Grid.Column="1" TextAlignment="Left" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<GroupBox Header="Stroke" Margin="0,0,0,2">
|
||||
<Grid Margin="4" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Alpha:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Red:" Margin="0,0,8,0" Grid.Row="1" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Green:" Margin="0,0,8,0" Grid.Row="2" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Blue:" Margin="0,0,8,0" Grid.Row="3" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Stroke.A}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.R}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="1" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.G}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="2" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.B}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="3" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Stroke.A}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.R}" Grid.Row="1" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.G}" Grid.Row="2" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.B}" Grid.Row="3" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="Fill" Margin="0,0,0,2">
|
||||
<Grid Margin="4" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Alpha:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Red:" Margin="0,0,8,0" Grid.Row="1" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Green:" Margin="0,0,8,0" Grid.Row="2" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Blue:" Margin="0,0,8,0" Grid.Row="3" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Fill.A}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.R}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="1" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.G}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="2" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.B}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="3" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Fill.A}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.R}" Grid.Row="1" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.G}" Grid.Row="2" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.B}" Grid.Row="3" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="Other" Margin="0,0,0,0">
|
||||
<Grid Margin="4" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Thickness:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Thickness}" Minimum="0" Maximum="20" TickFrequency="0.1" SmallChange="0.1" LargeChange="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Thickness}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
<Expander IsExpanded="True" Header="Stroke Color" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Alpha:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Red:" Margin="0,0,8,0" Grid.Row="1" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Green:" Margin="0,0,8,0" Grid.Row="2" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Blue:" Margin="0,0,8,0" Grid.Row="3" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Stroke.A}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.R}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="1" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.G}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="2" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Stroke.B}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="3" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Stroke.A}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.R}" Grid.Row="1" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.G}" Grid.Row="2" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Stroke.B}" Grid.Row="3" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander IsExpanded="True" Header="Fill Color" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Alpha:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Red:" Margin="0,0,8,0" Grid.Row="1" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Green:" Margin="0,0,8,0" Grid.Row="2" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Blue:" Margin="0,0,8,0" Grid.Row="3" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Fill.A}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.R}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="1" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.G}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="2" Grid.Column="1" Margin="1"/>
|
||||
<Slider Value="{Binding Fill.B}" Minimum="0" Maximum="255" TickFrequency="1" IsSnapToTickEnabled="True" Grid.Row="3" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Fill.A}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.R}" Grid.Row="1" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.G}" Grid.Row="2" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Fill.B}" Grid.Row="3" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander IsExpanded="True" Header="Stroke Thickness" DataContext="{Binding ElementName=stylesComboBox, Path=SelectedItem}">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Thickness:" Margin="0,0,8,0" Grid.Row="0" Grid.Column="0" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
<Slider Value="{Binding Thickness}" Minimum="0" Maximum="20" TickFrequency="0.1" SmallChange="0.1" LargeChange="1" IsSnapToTickEnabled="True" Grid.Row="0" Grid.Column="1" Margin="1"/>
|
||||
<TextBlock Text="{Binding Thickness}" Grid.Row="0" Grid.Column="2" TextAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
|
Загрузка…
Ссылка в новой задаче