GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - microsoft/XamlBehaviors: This is the official home for WinUI/UWP XAML Behaviors on GitHub.

BranchesTags
Open more actions menu

Latest commit

 

History

572 Commits
572 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
NuGet_Documentation
NuGet_Documentation
 
 
assets/packaging
assets/packaging
 
 
azure-pipelines
azure-pipelines
 
 
key
key
 
 
samples/CS
samples/CS
 
 
scripts
scripts
 
 
src/BehaviorsSDKManaged
src/BehaviorsSDKManaged
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.vsconfig
.vsconfig
 
 
LICENSE
LICENSE
 
 
NOTICE.txt
NOTICE.txt
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
es-metadata.yml
es-metadata.yml
 
 

Repository files navigation

XAML Behaviors

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

Build Status

Platform Status
Managed Build Managed

Getting Started

Where to get it

  • NuGet package for Managed
  • Source Code

Resources

  • Documentation
  • Samples
  • Changelog
  • Join the chat at https://gitter.im/Microsoft/XamlBehaviors

More Info

  • Report a bug or ask a question
  • Contribute
  • License

Code Example

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>

Using Behaviors SDK

The documentation explains how to install Visual Studio, add the XAML Behaviors NuGet package to your project, and get started using the API.

Building Behaviors from Source

What You Need

  • Visual Studio 2022 17.12+ w/ Universal Windows Tools
  • Multilingual App Toolkit

Clone the Repository

  • Go to 'View' -> 'Team Explorer' -> 'Local Git Repositories' -> 'Clone'
  • Add the XAML Behaviors repository URL (https://github.com/Microsoft/XamlBehaviors) and hit 'Clone'

Build and Create Managed XAML Behaviors NuGet

  • Ensure that nuget.exe is available in PATH
  • If you're using Visual Studio
    • Open the "BehaviorsSDKManaged.sln" solution in Visual Studio
    • Change Build Configuration to Release
    • Build solution with right click > Build, or by clicking F6
  • If you're building from CLI (Visual Studio Developer Command prompt):
    • Run nuget restore src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln
    • Run msbuild -t:build src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln /p:Configuration=Release

For UWP:

  • Run msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Uwp\Microsoft.Xaml.Interactivity.Uwp.csproj /p:Configuration=Release
    • (Optional) Add /p:TimestampPackage=true to include the timestamp in the NuGet package version

For WinUI:

  • Run msbuild /t:Pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.WinUI\Microsoft.Xaml.Interactivity.WinUI.csproj /p:Configuration=Release
    • (Optional) Add /p:TimestampPackage=true to include the timestamp in the NuGet package version

About

This is the official home for WinUI/UWP XAML Behaviors on GitHub.

Resources

Readme
MIT license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

794 stars

Watchers

84 watching

Forks

123 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.