This is the official home for WinUI/UWP XAML Behaviors on GitHub.
C#
793
535 commits
updated Oct 16, 2026
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 managed applications only. Use of XAML Behaviors is governed by the MIT License
| Platform | Status |
|---|---|
| Managed |
For an example of using Behaviors in an application, here is a snippet of XAML:
<Button xmlns:Interactivity="using:Microsoft.Xaml.Interactivity">
<Interactivity:Interaction.Behaviors>
<Interactivity:EventTriggerBehavior EventName="Click">
<Interactivity:ChangePropertyAction PropertyName="Background">
<Interactivity:ChangePropertyAction.Value>
<SolidColorBrush Color="Red"/>
</Interactivity:ChangePropertyAction.Value>
</Interactivity:ChangePropertyAction>
</Interactivity:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</Button>
The documentation explains how to install Visual Studio, add the XAML Behaviors NuGet package to your project, and get started using the API.
nuget restore src\BehaviorsSDKManaged\BehaviorsSDKManaged.slnmsbuild -t:build src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln /p:Configuration=ReleaseFor UWP:
msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Uwp\Microsoft.Xaml.Interactivity.Uwp.csproj /p:Configuration=Release
/p:TimestampPackage=true to include the timestamp in the NuGet package versionFor WinUI:
msbuild /t:Pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.WinUI\Microsoft.Xaml.Interactivity.WinUI.csproj /p:Configuration=Release
/p:TimestampPackage=true to include the timestamp in the NuGet package version152 followers · starred May 2019
648 followers · starred Apr 2016
83 followers · starred Jun 2022
42 followers · starred May 2019
This is the official home for WinUI/UWP XAML Behaviors on GitHub.
C#
793
535 commits
updated Oct 16, 2026
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 managed applications only. Use of XAML Behaviors is governed by the MIT License
| Platform | Status |
|---|---|
| Managed |
For an example of using Behaviors in an application, here is a snippet of XAML:
<Button xmlns:Interactivity="using:Microsoft.Xaml.Interactivity">
<Interactivity:Interaction.Behaviors>
<Interactivity:EventTriggerBehavior EventName="Click">
<Interactivity:ChangePropertyAction PropertyName="Background">
<Interactivity:ChangePropertyAction.Value>
<SolidColorBrush Color="Red"/>
</Interactivity:ChangePropertyAction.Value>
</Interactivity:ChangePropertyAction>
</Interactivity:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</Button>
The documentation explains how to install Visual Studio, add the XAML Behaviors NuGet package to your project, and get started using the API.
nuget restore src\BehaviorsSDKManaged\BehaviorsSDKManaged.slnmsbuild -t:build src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln /p:Configuration=ReleaseFor UWP:
msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Uwp\Microsoft.Xaml.Interactivity.Uwp.csproj /p:Configuration=Release
/p:TimestampPackage=true to include the timestamp in the NuGet package versionFor WinUI:
msbuild /t:Pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.WinUI\Microsoft.Xaml.Interactivity.WinUI.csproj /p:Configuration=Release
/p:TimestampPackage=true to include the timestamp in the NuGet package version152 followers · starred May 2019
648 followers · starred Apr 2016
83 followers · starred Jun 2022
42 followers · starred May 2019