Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/emoacht/wpfvisualstatetest
- Owner: emoacht
- Created: 2023-07-24T21:10:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-24T21:10:48.000Z (over 1 year ago)
- Last Synced: 2023-08-26T21:59:02.891Z (about 1 year ago)
- Topics: visualstategroup, visualstatemanager
- Language: C#
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`.