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