Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dotMorten/WindowsStateTriggers
A collection of custom visual state triggers
https://github.com/dotMorten/WindowsStateTriggers
Last synced: 3 months ago
JSON representation
A collection of custom visual state triggers
- Host: GitHub
- URL: https://github.com/dotMorten/WindowsStateTriggers
- Owner: dotMorten
- License: mit
- Created: 2015-03-24T18:02:03.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2020-07-22T01:33:28.000Z (over 4 years ago)
- Last Synced: 2024-07-01T11:36:38.082Z (4 months ago)
- Language: C#
- Size: 142 KB
- Stars: 243
- Watchers: 38
- Forks: 59
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-uwp - WindowsStateTriggers - WindowsStateTriggers is a collection of custom visual state triggers, including triggers such as DeviceFamilyStateTrigger, NetworkConnectionStateTrigger, RegexStateTrigger and more. (UI Library)
README
# UPDATE: Moved to Windows Community Toolkit
Most of these triggers has been moved to the Windows Community Toolkit and is where you'll see future enhancements happen.
See:
- Repo: https://github.com/windows-toolkit/WindowsCommunityToolkit
- Docs: https://docs.microsoft.com/en-us/windows/communitytoolkit/helpers/triggers
- Announcement: https://blogs.windows.com/windowsdeveloper/2020/06/15/announcing-windows-community-toolkit-v6-1/# WindowsStateTriggers
A collection of custom visual state triggers## Sponsoring
If you like this library and use it a lot, consider sponsoring me. Anything helps and encourages me to keep going.
See here for details: https://github.com/sponsors/dotMorten
### NuGet
Get it on nuget:
```
PM> Install-Package WindowsStateTriggers
```See more information on my blog:
http://www.sharpgis.net/post/2015/03/24/Using-Custom-Visual-State-Triggers##### Triggers available:
- `DeviceFamilyStateTrigger`: Trigger based on the device family (Desktop, Mobile, IoT or Team)
- `NetworkConnectionStateTrigger`: Trigger if internet connection is available or not
- `OrientationStateTrigger`: Trigger based on portrait/landscape mode
- `IsTrueStateTrigger`: Trigger if a value is true - REMOVED ! use `StateTrigger` and bind to `IsActive`
- `IsFalseStateTrigger`: Trigger if a value is false
- `IsNullOrEmptyStateTrigger`: Trigger if an object is null, or if a String or IEnumerable is empty
- `IsTypePresentStateTrigger`: Trigger if a type is present (ie hardware backbutton etc)
- `EqualsStateTrigger`: Trigger if `Value` is equal to `EqualTo`
- `NotEqualStateTrigger`: Trigger if `Value` is not equal to `NotEqualTo`
- `CompareStateTrigger`: Trigger if `Value` is equal, less than or greater than `CompareTo`
- `InputTypeTrigger`: Trigger based on the `PointerType` you're using on the `TargetElement`
- `RegexStateTrigger`: This trigger evaluates a regular expression against a string and triggers if a match is found.
- `CompositeStateTrigger`: This trigger combines other triggers using, And, Or or Xor to create even more powerful triggers.Run the test app to see a set of examples of these in use.
![windowsstatetriggers](https://cloud.githubusercontent.com/assets/1378165/7996451/483cb19e-0ad5-11e5-9be8-a41aa2127fef.gif)