annotate Messaging/Common/Controls/MessageTile.xaml @ 26:045dac571339

Working on data binding to a user control
author adminsh@apollo
date Wed, 21 Mar 2012 15:39:53 +0000
parents
children 96fdf58e05b4
rev   line source
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
1 <UserControl x:Class="Common.Controls.MessageTile"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
4 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
5 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
6 Width="200"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
7 Height="200"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
8 DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
9 mc:Ignorable="d">
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
10
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
11 <Grid>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
12
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
13 <Grid.RowDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
14 <RowDefinition Height="60" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
15 <RowDefinition Height="60" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
16 <RowDefinition Height="75" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
17 </Grid.RowDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
18
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
19 <Grid.ColumnDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
20 <ColumnDefinition Width="*" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
21 <ColumnDefinition Width="*" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
22 </Grid.ColumnDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
23
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
24 <Image Name="imageIcon"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
25 Grid.Row="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
26 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
27 Margin="10,10,0,0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
28 HorizontalAlignment="Left"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
29 VerticalAlignment="Top"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
30 Source="{Binding Path=DisplayIcon,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
31 Mode=OneWay,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
32 UpdateSourceTrigger=PropertyChanged}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
33 Stretch="None" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
34
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
35 <TextBlock Name="tbCount"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
36 Grid.Row="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
37 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
38 Grid.ColumnSpan="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
39 Margin="0,0,10,0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
40 HorizontalAlignment="Right"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
41 FontSize="48"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
42 Text="{Binding Path=DisplayCount,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
43 StringFormat=N0,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
44 Mode=TwoWay,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
45 UpdateSourceTrigger=PropertyChanged}" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
46
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
47 <TextBlock Name="tbTitle"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
48 Grid.Row="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
49 Grid.RowSpan="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
50 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
51 Grid.ColumnSpan="3"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
52 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
53 HorizontalAlignment="Right"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
54 VerticalAlignment="Bottom"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
55 FontSize="24"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
56 Text="{Binding Path=DisplayText,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
57 Mode=TwoWay,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
58 UpdateSourceTrigger=PropertyChanged}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
59 TextWrapping="Wrap" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
60
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
61 </Grid>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
62 </UserControl>