Skip to content

Support all VisualStates #297

Open
Open
@enisn

Description

@enisn

CheckBox Disabled style can't be customized since Checkbox doesn't go to Disabled Visual State state.

Following style doesn't affect CheckBox's disabled state.

   <Setter Property="VisualStateManager.VisualStateGroups">
    <VisualStateGroupList>
        <VisualStateGroup x:Name="CommonStates">
            <VisualState x:Name="Disabled">
                <VisualState.Setters>
                    <Setter Property="Color" Value="{AppThemeBinding Light={t:DynamicColor Color={StaticResource OnSurface}, Opacity=0.12},Dark={t:DynamicColor Color={StaticResource OnSurfaceDark}, Opacity=0.12}}"/>
                    <Setter Property="TextColor" Value="{AppThemeBinding Light={t:DynamicColor Color={StaticResource OnSurface}, Opacity=0.38},Dark={t:DynamicColor Color={StaticResource OnSurfaceDark}, Opacity=0.38}}"/>
                </VisualState.Setters>
            </VisualState>
        </VisualStateGroup>
    </VisualStateGroupList>
</Setter>

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions