MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Toolbar toggle button style issue

Open hfann opened this issue 4 years ago • 3 comments

Using version 4.3.0, the default style MaterialDesignToolToggleListBoxItem for toolbar toggle button in non-selected enabled state can be easily mistaken as disabled state.

By changing the Opacity property to 0.92 in the Ripple element, users will not mistaken the toggle button as disabled and the style will be more consistent with other toolbar button.

hfann avatar Jan 04 '22 10:01 hfann

Can you provide some xaml code and screenshots please ?

ElieTaillard avatar May 25 '22 13:05 ElieTaillard

Using the default style the toolbar toggle button (left button) looks like a disabled toolbar button. The button on the right is a normal toolbar button. image

After modifying the opacity, the toggle button looks like a normal toolbar button. image

<ListBox x:Name="ShowIconList">
    <ListBoxItem ToolTip="{x:Static str:Strings.ShowIcon}"
                         Style="{StaticResource MaterialDesignToolToggleListBoxItemA}"
                         Padding="8"
                         MinWidth="24"
                         MouseLeftButtonUp="SetProp_MouseLeftButtonUp"
                         IsSelected="{Binding SelectedItem.ShowIcon, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
             <Image Source="{Binding Converter={StaticResource IcoFileConv}, ConverterParameter=24, Source=Res/Warning.ico}"
                          Width="20"
                          Height="20"
                          RenderOptions.BitmapScalingMode="Fant"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Center" />
     </ListBoxItem>
</ListBox>
<Button ToolTip="{x:Static str:Strings.ChgIcon}"
              Padding="8"
              Command="{Binding ChangeIconCommand}">
        <Image Source="{Binding Converter={StaticResource IcoFileConv}, ConverterParameter=24, Source=Res/ChangeIcon.ico}"
                     Width="20"
                     Height="20"
                     RenderOptions.BitmapScalingMode="Fant"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Center" />
</Button>

The style MaterialDesignToolToggleListBoxItemA is the same as MaterialDesignToolToggleListBoxItem style with only opacity modified.

hfann avatar May 27 '22 02:05 hfann

Old issue https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/1453

ElieTaillard avatar Jun 29 '22 08:06 ElieTaillard