Skip to content

Commit 6ae015d

Browse files
committed
Added a helper method for switching visual states in wpf application
1 parent d9eb491 commit 6ae015d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Codebreaker.WPF.Helpers;
2+
3+
internal static class VisualStateHelpers
4+
{
5+
public static bool GoToState(this FrameworkElement element, string visualStateName, bool useTransitions = true) =>
6+
VisualStateManager.GoToElementState(element, visualStateName, useTransitions);
7+
}

0 commit comments

Comments
 (0)