This is the official home for UWP XAML Behaviors on GitHub.
Перейти к файлу
Nigel Sampson f07bec0b41 Native Sample uses build output 2016-02-03 13:41:14 +13:00
assets/packaging Removing documentation assets from repo 2015-11-19 13:24:14 -08:00
key Add StrongName signing to managed assemblies 2015-11-16 15:57:21 -08:00
samples Native Sample uses build output 2016-02-03 13:41:14 +13:00
scripts Set the rd.xml files Build Action to Embedded Resource in all projects 2015-12-05 18:18:53 +00:00
src Fixed #76: Properly check for Windows Runtime events in EventTriggerBehavior 2016-01-26 11:24:49 +00:00
tests Cleaned up file structure. 2015-07-23 11:17:48 -07:00
.gitattributes Pushing new version of the sample project. 2015-09-09 05:21:39 -07:00
.gitignore Fixing .exe commit issue. 2015-09-04 11:27:41 -07:00
LICENSE Initial commit 2015-07-20 11:03:14 -07:00
README.md added native behaviors AppVeyor badge 2016-01-22 16:43:24 -07:00

README.md

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 both native and managed applications. Use of XAML Behaviors is governed by the MIT License

#Build Status

Platform Status
Managed
Native

Getting Started

Where to get it

Resources

More Info

Code Example

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>

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

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

  • Open the "BehaviorsSDKManaged.sln" solution in Visual Studio
  • Change Build Configuration to Release
  • Build [Ctrl + B]
  • Install the latest NuGet command-line tool by running scripts/download-nuget.cmd
  • Run scripts/CreateManagedNuGet.cmd

Build and Create Native XAML Behaviors NuGet

  • Open the "BehaviorsSDKNative.sln" solution in Visual Studio
  • Batch Build for x86, x64, and ARM in Release
  • Install the latest NuGet command-line tool by running scripts/download-nuget.cmd
  • Run scripts/CreateNativeNuGet.cmd