1 <!--<SnippetOCHowTo>-->
4 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
5 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6 xmlns:c="clr-namespace:SDKSample"
7 x:Class="SDKSample.Window1"
10 Title="MultiBinding Sample">
13 <c:NameList x:Key="NameListData"/>
14 <c:NameConverter x:Key="myNameConverter"/>
16 <DataTemplate x:Key="NameItemTemplate">
19 <MultiBinding Converter="{StaticResource myNameConverter}">
20 <Binding Path="FirstName"/>
21 <Binding Path="LastName"/>
27 <Style TargetType="{x:Type TextBlock}">
28 <Setter Property="Width" Value="120"/>
29 <Setter Property="Background" Value="Silver"/>
30 <Setter Property="HorizontalAlignment" Value="Center"/>
35 <TextBlock FontSize="18" FontWeight="Bold" Margin="10"
36 Background="White" Width="Auto">MultiBinding Sample</TextBlock>
39 ItemsSource="{Binding Source={StaticResource NameListData}}"
40 ItemTemplate="{StaticResource NameItemTemplate}"
41 IsSynchronizedWithCurrentItem="True"/>
44 <TextBlock Padding="0,20,0,0" FontSize="11" Background="White">Normal Format:</TextBlock>
45 <TextBlock Name="textBox1" DataContext="{StaticResource NameListData}">
47 <MultiBinding Converter="{StaticResource myNameConverter}"
48 ConverterParameter="FormatNormal">
49 <Binding Path="FirstName"/>
50 <Binding Path="LastName"/>
55 <TextBlock Padding="0,20,0,0" FontSize="11" Background="White">Last Name First Format:</TextBlock>
56 <TextBlock Name="textBox2" DataContext="{StaticResource NameListData}">
58 <MultiBinding Converter="{StaticResource myNameConverter}"
59 ConverterParameter="FormatLastFirst">
60 <Binding Path="FirstName"/>
61 <Binding Path="LastName"/>
68 <!--</SnippetWindow>-->