annotate Messaging/Server/UI/MainWindow.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 <metro:Window x:Class="Server.UI.MainWindow"
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:c="clr-namespace:Common.Controls;assembly=Common"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
5 xmlns:converters="clr-namespace:Server.Converters"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
6 xmlns:metro="http://schemas.codeplex.com/elysium/theme"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
7 Title="Messaging Server"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
8 Width="700"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
9 Height="475"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
10 MinWidth="700"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
11 MinHeight="475"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
12 DataContext="{Binding MainWindowViewModel,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
13 Source={StaticResource Locator}}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
14 Icon="{StaticResource Mail}">
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
15
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
16 <TabControl Margin="{Binding Source={x:Static metro:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}">
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
17 <TabItem Header="dashboard">
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
18 <Grid HorizontalAlignment="Center">
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="220" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
21 <ColumnDefinition Width="220" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
22 <ColumnDefinition Width="220" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
23 </Grid.ColumnDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
24 <Grid.RowDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
25 <RowDefinition Height="Auto" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
26 <RowDefinition Height="220" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
27 <RowDefinition Height="*" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
28 <RowDefinition Height="50" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
29 </Grid.RowDefinitions>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
30
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
31 <ToggleButton Grid.Row="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
32 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
33 Margin="10,10,10,0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
34 Content="{Binding SocketEndPoint.IsListening,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
35 Converter={converters:ToggleButtonToTextConverter}}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
36 IsChecked="{Binding SocketEndPoint.IsListening}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
37 IsEnabled="True"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
38 IsThreeState="False" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
39
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
40 <ToggleButton Grid.Row="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
41 Grid.Column="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
42 Margin="10,10,10,0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
43 Content="{Binding SocketEndPoint.IsListening,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
44 Converter={converters:ToggleButtonToTextConverter}}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
45 IsChecked="{Binding SocketEndPoint.IsListening}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
46 IsEnabled="True" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
47
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
48 <ToggleButton Grid.Row="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
49 Grid.Column="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
50 Margin="10,10,10,0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
51 Content="{Binding SocketEndPoint.IsListening,
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
52 Converter={converters:ToggleButtonToTextConverter}}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
53 IsChecked="{Binding SocketEndPoint.IsListening}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
54 IsEnabled="True" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
55
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
56 <c:MessageTile Grid.Row="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
57 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
58 Background="{StaticResource MetroPurpleBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
59 DisplayCount="{Binding SocketEndPoint.DisplayCount, Mode= TwoWay, UpdateSourceTrigger=PropertyChanged}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
60 DisplayIcon="{StaticResource Mail}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
61 DisplayText="{Binding SocketEndPoint.DisplayText}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
62 Foreground="White"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
63 ToolTip="{Binding SocketEndPoint.ToolTip}" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
64
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
65 <c:MessageTile Grid.Row="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
66 Grid.Column="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
67 Background="{StaticResource MetroGreenBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
68 DisplayCount="{Binding SocketEndPoint.DisplayCount}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
69 DisplayIcon="{StaticResource Mail}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
70 DisplayText="{Binding DisplayText}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
71 Foreground="White"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
72 ToolTip="{Binding SocketEndPoint.ToolTip}" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
73
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
74 <c:MessageTile Grid.Row="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
75 Grid.Column="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
76 Background="{StaticResource MetroOrangeBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
77 DisplayCount="{Binding SocketEndPoint.DisplayCount}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
78 DisplayIcon="{StaticResource Mail}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
79 DisplayText="{Binding SocketEndPoint.DisplayText}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
80 Foreground="White"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
81 ToolTip="{Binding SocketEndPoint.ToolTip}" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
82
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
83 <TextBlock Grid.Row="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
84 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
85 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
86 Background="{StaticResource MetroGrayBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
87 Padding="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
88 Text="{Binding SocketEndPoint.DisplayLog}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
89 TextWrapping="Wrap" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
90
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
91 <TextBlock Grid.Row="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
92 Grid.Column="1"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
93 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
94 Background="{StaticResource MetroGrayBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
95 Padding="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
96 Text="{Binding SocketEndPoint.DisplayLog}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
97 TextWrapping="WrapWithOverflow" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
98
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
99 <TextBlock Grid.Row="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
100 Grid.Column="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
101 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
102 Background="{StaticResource MetroGrayBrush}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
103 Padding="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
104 Text="{Binding SocketEndPoint.DisplayLog}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
105 TextWrapping="WrapWithOverflow" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
106
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
107 <metro:ToggleSwitch Grid.Row="3"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
108 Grid.Column="0"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
109 Width="80"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
110 Height="50"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
111 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
112 HorizontalAlignment="Left"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
113 IsChecked="{Binding OverrideSwitch}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
114 IsEnabled="True" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
115 <Button Grid.Row="3"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
116 Grid.Column="2"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
117 Width="75"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
118 Margin="10"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
119 HorizontalAlignment="Right"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
120 Command="{Binding CloseCommand}"
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
121 Content="Close" />
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
122 </Grid>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
123 </TabItem>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
124 </TabControl>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
125 </metro:Window>