Mercurial > silverbladetech
annotate MetroWpf/Stocks.UI/Views/StocksView.xaml @ 23:399398841fd0
Working version for Stocks (including loosely coupled components
author | adminsh@apollo |
---|---|
date | Tue, 20 Mar 2012 16:53:29 +0000 |
parents | |
children | 4b8b38d17d24 |
rev | line source |
---|---|
23
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
1 <UserControl x:Class="Stocks.UI.Views.StocksView" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
4 xmlns:Converters="clr-namespace:Stocks.UI.Converters" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
6 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
7 d:DesignHeight="100" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
8 d:DesignWidth="600" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
9 DataContext="d:DesignInstance vm:StocksViewModel" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
10 mc:Ignorable="d"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
11 |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
12 <Grid x:Name="LayoutRoot"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
13 <Grid.RowDefinitions> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
14 <RowDefinition Height="60" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
15 <RowDefinition Height="20" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
16 <RowDefinition Height="400" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
17 <RowDefinition Height="180" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
18 </Grid.RowDefinitions> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
19 <Grid.Resources> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
20 <Converters:BoolToServiceRunningTextConverter x:Key="BoolToServiceRunningTextConverter" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
21 <Converters:BoolToSubscribedTextConverter x:Key="BoolToSubscribedTextConverter" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
22 <Converters:DeltaToIconConverter x:Key="DeltaToIconConverter" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
23 <Converters:AbsoluteNumberConverter x:Key="AbsoluteNumberConverter" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
24 <Converters:DateTimeToTimeConverter x:Key="DateTimeToTimeConverter" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
25 </Grid.Resources> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
26 |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
27 <StackPanel Grid.Row="0" Orientation="Horizontal"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
28 <Button x:Name="btnServiceRunning" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
29 Width="100" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
30 Height="30" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
31 Margin="5,0,0,0" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
32 HorizontalAlignment="Left" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
33 Command="{Binding ServiceCommand, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
34 Mode=TwoWay}" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
35 Content="{Binding ServiceRunning, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
36 Converter={StaticResource BoolToServiceRunningTextConverter}}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
37 <Button x:Name="btnSubscribe" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
38 Width="100" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
39 Height="30" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
40 Margin="10,0,0,0" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
41 HorizontalAlignment="Left" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
42 Command="{Binding SubscriptionCommand, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
43 Mode=TwoWay}" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
44 Content="{Binding Subscribed, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
45 Converter={StaticResource BoolToSubscribedTextConverter}}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
46 </StackPanel> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
47 |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
48 <StackPanel Grid.Row="1" Orientation="Horizontal"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
49 <TextBlock Width="260" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
50 Margin="5,0,0,0" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
51 Text="Company" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
52 <TextBlock Width="80" Text="Symbol" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
53 <TextBlock Width="100" Text="Price" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
54 <TextBlock Width="100" Text="Previous" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
55 <TextBlock Width="105" Text="Change" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
56 </StackPanel> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
57 <ListBox x:Name="lbStockPrices" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
58 Grid.Row="2" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
59 BorderThickness="0" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
60 FontFamily="Segoe UI" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
61 ItemsSource="{Binding Path=DisplayStockPrices}"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
62 <ListBox.ItemTemplate> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
63 <DataTemplate> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
64 <StackPanel Orientation="Horizontal"> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
65 <TextBlock Width="263" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
66 Margin="2,0,0,0" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
67 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
68 Text="{Binding CompanyName}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
69 <TextBlock Width="80" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
70 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
71 Text="{Binding Symbol}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
72 <TextBlock Width="100" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
73 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
74 Text="{Binding CurrentPrice}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
75 <TextBlock Width="100" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
76 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
77 Text="{Binding PreviousPrice}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
78 <Image Width="20" Source="{Binding Delta, Converter={StaticResource DeltaToIconConverter}}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
79 <TextBlock Width="85" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
80 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
81 Text="{Binding Delta, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
82 Converter={StaticResource AbsoluteNumberConverter}}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
83 <!-- |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
84 <TextBlock Width="85" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
85 FontSize="15" |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
86 Text="{Binding Timestamp, |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
87 Converter={StaticResource DateTimeToTimeConverter}}" /> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
88 --> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
89 </StackPanel> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
90 </DataTemplate> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
91 </ListBox.ItemTemplate> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
92 </ListBox> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
93 </Grid> |
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
diff
changeset
|
94 </UserControl> |