Welcome Guest, you are in: Login

Daisley-Harrison Software

RSS RSS

Navigation




Search the wiki
»

Using Binding Converters with Translation Binding

RSS
Modified on 2009/02/18 23:21 by aarondh Categorized as Uncategorized
I needed to create an IValueConverter in Silverlight and do to a Xaml binding conversion inside a ControlTemplate.

The solution is to do something like this:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Hitachi.BusinessProcessViewer;assembly=Hitachi.BusinessProcessViewer">
...
...
...
	<local:DateTimeConverter x:Key="DateTimeConverter"/>
...
...
...
	<TextBlock DataContext="{TemplateBinding Created}" Text="{Binding Converter={StaticResource DateTimeConverter}}"/>
        </ResourceDictionary>
...
...
...
}}







Please visit our blog at http://blog.daisley-harrison.com

- All Content © Copyright 2010 Daisley-Harrison Software - All Rights Reserved. - ScrewTurn Wiki version 3.0.1.400.