Coolthing Of Theday

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 27 September 2013

Oh Behave... Behaviors SDK and the new BlendBehaviors.NET

Posted on 17:31 by Unknown

Timmy Kokke - Behaviors SDK

When the release candidate of Visual Studio 2013 came available, so did the Behaviors SDK. The Behaviors SDK is somewhat similar to the Expression Blend SDK you might have used before when using Behaviors and Actions. Along with the SDK come a couple of actions and behaviors you can use in your Windows Store applications right away.

What are they?

Both behaviors and actions are small pieces of code that can be reused throughout your projects. In the case of the new Behaviors SDK the only thing you need to do is implement an interface. A behavior adds some behavior to an element in your application. A behavior has a method that is invoked when the behavior is attached to a Dependency Object. It also has a method that is invoked when it is detached. An action contains only one method that is invoked when a certain condition is met. This condition can be a event that is raised, or a state of data or well pretty much everything.

Those of you who are used to working with behaviors and actions on other platforms might miss the triggers. Triggers where used to work together with actions, and presented the reason for an action to be executed. In the new Behaviors SDK triggers are no longer there. They are replaced by behaviors.

What’s in the SDK?

The Behaviors SDK consists of two parts. One (Microsoft.Xaml.Interactivity) contains the tools you need to create your own behaviors and actions(more about this is a sec). The other (Microsoft.Xaml.Interactions) contains a few of the most commonly used behaviors and actions(which are build with the interfaces from the first part b.t.w.). Not everything you might be used to working with from other platforms is included in de SDK, but I’m pretty sure these will be available through open source channels.

Let’s just go over the actions and behaviors included in de SDK.

Actions:

  • CallMethodAction : An action that calls a method on a specified object when invoked.
  • ChangePropertyAction : An action that will change a specified property to a specified value when invoked.
  • GoToStateAction : An action that will transition a FrameworkElement to a specified VisualState when executed.
  • InvokeCommandAction : Executes a specified ICommand when invoked.
  • NavigateToPageAction : An action that switches the current visual to the specified Page.
  • ControlStoryboardAction : An action that will change the state of the specified Storyboard when executed.
  • PlaySoundAction : An action that will play a sound to completion.

Behaviors:

  • DataTriggerBehavior : A behavior that performs actions when the bound data meets a specified condition.
  • EventTriggerBehavior : A behavior that listens for a specified event on its source and executes its actions when that event is fired.
  • IncrementalUpdateBehavior : A behavior that allows incremental updating of ListView and GridView contents to support faster updating. By attaching this behavior to elements in the ItemTemplate used by these views, some of the updates can be deferred until there is render time available, resulting in a smoother experience.

The other part contains two interfaces you need when building your own: IAction and IBehavior. There are some attributes and helper classes you can use too.

...

BlendBehaviors.NET

Welcome to BlendBehaviors.NET. As a XAML developer I use behaviors a lot. Like most developers, I don't like writing the same code over and over. Let us all share our behaviors and actions so we have to write even less.

SNAGHTML606d3

Something I need to look more into, especially in my WPF world...

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in .Net, Development, Expression, Windows8, Windows8.1, XAML | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Mr. 7,000! This is my 7,000th post...
    Before this post; After; 20 visits between taking these snaps? Oh wait, that's probably me searching for past related posts....
  • Windows Management Framework 4.0 (PowerShell 4, PowerShell ISE, Management OData, WMI, etc.) now available
    Keith Hill's Blog - PowerShell 4.0 Now Available You can get PowerShell 4.0 for down level operating systems now via the WMF 4.0 d...
  • "Windows Server Essentials Media Pack" (DNLA Stream, HTML5 and Dashboard Media stuff)
    Microsoft Downloads - Windows Server Essentials Media Pack This pack enables the media streaming functionality for Windows Server 2012...
  • Rad Gate Post... Get your Red Gate Post here...
    simple talk - Melanie Townsend - Get a copy of the Red Gate Post We recently put together a newspaper of some of the best articles fr...
  • Learning Log Parser Studio in two parts... (From Install to Library Ninja)
    Kary Wall - Getting Started with Log Parser Studio - Part 1 & Getting Started with Log Parser Studio - Part 2 Hopefully, if you a...
  • Viasfora - Your new favorite Visual Studio Text/*ML Editing Extension?
    Winterdom - Introducing Viasfora A couple of days ago, I unveiled Viasfora , my latest attempt at building a decently packaged extensi...
  • [Hardware Review] It's been a Haswell Summer... Haswell/Harris Beach Intel SDS Ultrabook Review - Part 3
    Are you all tired of it yet? Have you heard it often enough already? Well too bad! Haswell is Battery Love! MUHAHAhahahahaha.... There! ...
  • "Windows Server [2012 R2]: The Best Infrastructure to Run Linux Workloads"
    In the Cloud - What’s New in 2012 R2: Enabling Open Source Software Part 4 of a 9-part series . ... There are a lot of great s...
  • Want the world's best Science Fiction And Fantasy Library? Come to LA... The Eaton Collection @ UC Riverside
    CBS Los Angeles - The Eaton Collection: The Best Science Fiction And Fantasy Library Science fiction and fantasy fans rejoice and take...
  • Windows 8.1 Store App Paper Prototyping Templates
    Jason Roberts Don't Code Tired   - Paper Prototyping Templates for Windows 8.1 Store Apps These are updated paper prototyping templ...

Categories

  • .Net
  • 3DPrinting
  • AFeedYouShouldRead
  • Agile
  • ALM
  • Amazon
  • Amiga
  • Analytics
  • Android
  • ASP.NET
  • Azure
  • BigData
  • bing
  • Blogging
  • Book
  • BookReview
  • BUILD
  • C
  • C#
  • C++
  • Career
  • Cat
  • cheatsheet
  • ClickOnce
  • Cloud
  • ComputerHardware
  • css
  • Data
  • DBA
  • DependencyInjection
  • Deployment
  • Design
  • Development
  • devops
  • DVCS
  • ebook
  • EDD
  • Education
  • EnterpriseLibrary
  • EntityFramework
  • Exchange
  • Expression
  • gadget
  • Game
  • GIT
  • Google
  • Government
  • Hadoop
  • hardware
  • HardwareReview
  • HaswellReview
  • HTML5
  • Humor
  • IE
  • IEExtension
  • IfAllElseFails
  • IIS
  • ILMerge
  • Image
  • Infographic
  • interview
  • InversionOfControl
  • Java
  • Javascript
  • Kinect
  • LightSwitch
  • LINQ
  • Linux
  • LosAngeles
  • Lucene
  • Lync
  • MEF
  • Metro
  • MicrosoftOffice
  • MicrosoftOutlook
  • Mono
  • MVC
  • MVVM
  • NetMon
  • NLP
  • NoSQL
  • NuGet
  • OData
  • OneNote
  • OpenXML
  • Paint.Net
  • Personal
  • Photosynth
  • Physics
  • portable
  • Poster
  • PowerShell
  • Preparedness
  • Presentation
  • Prism
  • PrivateCloud
  • RegEx
  • RemoteDesktop
  • Reporting
  • RIAServices
  • Science
  • ScienceFiction
  • Scratch
  • Scrum
  • ServiceBus
  • SharePoint
  • Silverlight
  • SimiValley
  • SPA
  • Space
  • SQLServer
  • Storyboard
  • Surface
  • SVG
  • SystemAdministration
  • T4
  • TeamBuild
  • TeamFoundationServer
  • TechEd
  • Training
  • TypeScript
  • UnitTesting
  • UnityApplicationBlock
  • Utility
  • Veteran
  • VirtualMachine
  • Visio
  • VisualBasic
  • VisualStudio
  • WCF
  • Web X.X
  • Webcast
  • WebFeed
  • WebMatrix
  • Windows
  • Windows7
  • Windows8
  • Windows8.1
  • WindowsHomeServer
  • WindowsLiveWriter
  • WindowsPhone
  • WindowsServer
  • WinRT
  • WiX
  • WMI
  • WOPI
  • WPF
  • XAML
  • XBox360
  • XboxOne
  • zombie

Blog Archive

  • ▼  2013 (500)
    • ►  December (12)
    • ►  November (61)
    • ►  October (65)
    • ▼  September (38)
      • Oh Behave... Behaviors SDK and the new BlendBehav...
      • High Level View of the Difference Between Office 2...
      • Speckie (THE IE Spell Checker Extension) v6 Releas...
      • Cool JavaScript of the Day - The World in 1k
      • Did you get the message? Message Analyzer v1.0 has...
      • [Geek Humor] If Windows 8 came on Floppies...
      • Get a big jump into Big Data with the "Getting Sta...
      • "The Ultimate Agile Planning Handbook" Free [email...
      • WakaWaka wild holiday solar special... Power a com...
      • Space Mining - Science Fiction or just Science? (N...
      • Red Gate goes SQL Loco for OSS Projects...
      • It's [going to be] a girl!
      • "The 7 Irrefutable Rules of Bacon"
      • OSS that a sysadmin can love... InfoWorld's 12 Sys...
      • The HOL "Building a Release Pipeline with Team Fou...
      • [Hardware Review] Life with Haswell... Haswell/Har...
      • New from NirSoft, SoundVolumeView (think "Uber vol...
      • No need to fake it 'till you make it when you have...
      • [I Miss My Amiga - Way Back Post] AmigaHASP
      • Remember...
      • "Winging It" is a pretty rough Preparedness Plan (...
      • Also out yesterday, 2012.4rc3 - TFS 2012 and Visua...
      • Just a few shell games... shellproperty.exe and Ra...
      • Remember 9-11, Los Angeles Events
      • I miss you, MSICUU2 - "What happened to the Window...
      • Get Blue! (No, not that Blue...) Get the free Offi...
      • Silicon Beach gets a new Microsoft [Technology Cen...
      • What's the new in Windows Server 2012 R2?
      • UC Irvine, Canvas and AMC - "Society, Science, Sur...
      • I2BLE (Intro to Bluetooth Low Energy)
      • "Introducing Windows Server 2012 R2" [Preview eBoo...
      • The Old with the New - How to [unofficially] upgra...
      • Setting your Kindle on fire with Kindle MatchBook
      • CodePlex has a new face (well actually, he's kind ...
      • [Not Humor] Windows To Go Fact Sheet from the NSA
      • Lighting the way into the future (of LightSwitch) ...
      • "Windows Store Apps Succinctly" 185 page ebook fro...
      • 28 in 2... 28 tips in two months from Daily .NET Tips
    • ►  August (47)
    • ►  July (75)
    • ►  June (39)
    • ►  May (40)
    • ►  April (42)
    • ►  March (39)
    • ►  February (42)
Powered by Blogger.

About Me

Unknown
View my complete profile