Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emoacht/wpfvisualstatetest

Test VisualStateGroup in WPF.
https://github.com/emoacht/wpfvisualstatetest

visualstategroup visualstatemanager

Last synced: about 4 hours ago
JSON representation

Test VisualStateGroup in WPF.

Awesome Lists containing this project

README

        

# WPF VisualState Test

Test VisualStateGroup in WPF, especially the case where a same property is targetted by multiple VisualStateGroups.

## Remarks

The VisualStates of `ToggleButton` is controlled by the following methods:

- [ChangeVisualState method (ButtonBase class)](https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/Primitives/ButtonBase.cs,781)

- [ChangeVisualState method (ToggleButton class)](https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/Primitives/ToggleButton.cs,273)

A notable behavior of `VisualStateManager.GoToState` method is described at [Use the VisualStateManager to Manage States](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/creating-a-control-that-has-a-customizable-appearance#use-the-visualstatemanager-to-manage-states)

> If the control is already in the state that is specified, GoToState takes no action and returns `true`.