WPUtils provides out-of-box attached properties/behaviors to extent existing controls/components. It includes ChoosePhotoBehavior, SelectedItems attached property, PinToStartAction, NavigateWithQueryStringAction, HyperlinkAction, and so on.

get the toolkit

WPUtils is now available on NuGet Gallery. Simply add it to your project through the NuGet extension from within Visual Studio. If you are using Visual Studio Express, you can still download it from here CodePlex and add it to your project manually.

sample code

    Grid.Row="1" SelectionMode="Multiple"
    ItemTemplate="{StaticResource IngredientTemplate}"
    ItemContainerStyle="{StaticResource HighlightSelection}"
    ItemsSource="{Binding Ingredients}"
    wpu:ListBoxProperties.SelectedItems="{Binding SelectedIngredients}"/>

        <wpu:ChoosePhotoBehavior PhotoUri="{Binding Item.ImageUri, Mode=TwoWay}"/>

<Image Source="{Binding ImageUri, Converter={StaticResource UriToPhotoConverter}}"/>

<Button Content="pin" IsEnabled="{Binding TileAbsent}" Margin="0,12,0,0">
        <i:EventTrigger EventName="Click">
                NavigationUri="{Binding NavigationUri}"
                BackgroundImage="{Binding BackgroundImage}"
                Title="{Binding TileTitle}"/>

<toolkit:MenuItem Header="edit">
        <i:EventTrigger EventName="Click">
                <wpu:Parameter Field="id" Value="{Binding Id}"/>
You can find a fully functional demo in the source code.

how to use

  1. A First Look at WPUtils
  2. Working with PinToStartAction
  3. 通过附加属性和行为扩展控件
If you find a bug, you can file it at Issue Tracker. If you have troubles while using this toolkit, you can raise your question at Discussions. Thanks!

latest changes

version description
1.3 [New features] HyperlinkAction has been added for showing web page via WebBrowserTask.

Last edited Oct 17, 2012 at 11:30 AM by allenlooplee, version 21