XAML Behaviors is an easy-to-use means of adding common and reusable interactivity to your Windows UWP applications with minimal code. It is available for both native and managed applications. Use of XAML Behaviors is governed by the MIT License
Where to get it
- NuGet package
- Source Code
Resources
More Info
For an example of using Behaviors in an application, here is a snippet of XAML:
<Button>
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="Click">
<Core:ChangePropertyAction PropertyName="Background">
<Core:ChangePropertyAction.Value>
<SolidColorBrush Color="Red"/>
</Core:ChangePropertyAction.Value>
</Core:ChangePropertyAction>
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</Button>
The documentation explains how to install Visual Studio, add the Behaviors SDK NuGet package to your project, and get started using the API.
What You Need
Build and Create Managed XAML Behaviors NuGet
- Clone the Repository
- Open the solution in Visual Studio
- Change Build Configuration to Release
- Build [Shift + B]
- Run scripts/CreateManagedNuGet.cmd
Build and Create Native XAML Behaviors NuGet
- Clone the Repository
- Open the solution in Visual Studio
- Batch Build for x86, x64, and ARM
- Run scripts/CreateNativeNuGet.cmd