Commit b6841835 by wangonghui

颜色字体UI调整

parent 6135859d
......@@ -51,6 +51,22 @@
<TextBlock Text="{Binding Name}" Margin="6,0,6,0"/>
</StackPanel>
</DataTemplate>
<Style x:Key="ButtonInfoColor" TargetType="dxe:ButtonInfo">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="Black"/>
</Trigger>
<Trigger Property="IsEnabled" Value="True">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid VerticalAlignment="Top">
......@@ -74,11 +90,17 @@
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<dxe:ButtonEdit ShowText="False" AllowDefaultButton="False" IsEnabled="{Binding BtnGroupEnable,Mode=TwoWay}">
<dxe:ButtonInfo Content="Ambient" IsEnabled="{Binding Path=IsEnabledA,Mode=TwoWay}" Command="{Binding AmbCommand}"/>
<dxe:ButtonInfo Content="Diffuse" IsEnabled="{Binding Path=IsEnabledD,Mode=TwoWay}" Command="{Binding DiffCommand}"/>
<dxe:ButtonInfo Content="Specular" IsEnabled="{Binding Path=IsEnabledS,Mode=TwoWay}" Command="{Binding SpecCommand}"/>
<dxe:ButtonInfo Content="Emission" IsEnabled="{Binding Path=IsEnabledE,Mode=TwoWay}" Command="{Binding EmisCommand}"/>
<dxe:ButtonInfo Style="{StaticResource ButtonInfoColor }" Content="Ambient" IsEnabled="{Binding Path=IsEnabledA,Mode=TwoWay}" Command="{Binding AmbCommand}"/>
<dxe:ButtonInfo Style="{StaticResource ButtonInfoColor }" Content="Diffuse" IsEnabled="{Binding Path=IsEnabledD,Mode=TwoWay}" Command="{Binding DiffCommand}"/>
<dxe:ButtonInfo Style="{StaticResource ButtonInfoColor }" Content="Specular" IsEnabled="{Binding Path=IsEnabledS,Mode=TwoWay}" Command="{Binding SpecCommand}"/>
<dxe:ButtonInfo Style="{StaticResource ButtonInfoColor }" Content="Emission" IsEnabled="{Binding Path=IsEnabledE,Mode=TwoWay}" Command="{Binding EmisCommand}"/>
<!--<dxe:ButtonInfo Content="Ambient" IsEnabled="{Binding Path=IsEnabledA,Mode=TwoWay}" Command="{Binding AmbCommand}"/>
<dxe:ButtonInfo Content="Diffuse" IsEnabled="{Binding Path=IsEnabledD,Mode=TwoWay}" Command="{Binding DiffCommand}"/>
<dxe:ButtonInfo Content="Specular" IsEnabled="{Binding Path=IsEnabledS,Mode=TwoWay}" Command="{Binding SpecCommand}"/>
<dxe:ButtonInfo Content="Emission" IsEnabled="{Binding Path=IsEnabledE,Mode=TwoWay}" Command="{Binding EmisCommand}"/>-->
</dxe:ButtonEdit>
......@@ -110,8 +132,8 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="0"/>
</Grid.ColumnDefinitions>
<WrapPanel Grid.Column="0" Height="40">
......@@ -151,18 +173,22 @@
</Grid>
</WrapPanel>
<Border Name="currentColor" BorderBrush="DarkGray" BorderThickness="1" Width="40" Background="{Binding Path=ColorValue, Converter={StaticResource ColorToBrushConverter} }" Grid.Column="2"/>
<!--<Border Name="currentColor" BorderBrush="DarkGray" BorderThickness="1" Width="40" Background="{Binding Path=ColorValue, Converter={StaticResource ColorToBrushConverter} }" Grid.Column="2"/>-->
<dxe:PopupColorEdit Grid.Row="1" Grid.Column="2" x:Name="brushColorEdit" VerticalAlignment="Center" Height="30" HorizontalAlignment="Center"
Color="{Binding Path=ColorValue,Mode=TwoWay}" Palettes="{Binding ElementName=palettes, Path=EditValue, Mode=TwoWay}"
ShowDefaultColorButton="False" />
</Grid>
</WrapPanel>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<!--<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<dxe:ColorEdit Color="{Binding Path=ColorValue,Mode=TwoWay}" ShowDefaultColorButton="False" >
</dxe:ColorEdit>
</StackPanel>
</StackPanel>-->
</Grid>
</UserControl>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment