Mercurial > silverbladetech
comparison MetroWpf/FxRates.UI/Views/FxRatesView.xaml @ 24:a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
author | adminsh@apollo |
---|---|
date | Tue, 20 Mar 2012 20:18:35 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
23:399398841fd0 | 24:a8b50a087544 |
---|---|
1 <UserControl x:Class="FxRates.UI.Views.FxRatesView" | |
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
4 xmlns:Converters="clr-namespace:FxRates.UI.Converters" | |
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
6 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
7 xmlns:ViewModels="clr-namespace:FxRates.UI.ViewModels" | |
8 d:DataContext="{d:DesignInstance ViewModels:FxRatesViewModel}" | |
9 d:DesignHeight="50" | |
10 d:DesignWidth="350" | |
11 mc:Ignorable="d"> | |
12 | |
13 <Grid x:Name="LayoutRoot"> | |
14 <Grid.RowDefinitions> | |
15 <RowDefinition Height="60" /> | |
16 <RowDefinition Height="20" /> | |
17 <RowDefinition Height="280" /> | |
18 <RowDefinition Height="180" /> | |
19 </Grid.RowDefinitions> | |
20 <Grid.Resources> | |
21 <Converters:BoolToServiceRunningTextConverter x:Key="BoolToServiceRunningTextConverter" /> | |
22 <Converters:BoolToSubscribedTextConverter x:Key="BoolToSubscribedTextConverter" /> | |
23 <Converters:CcyFromIconConverter x:Key="CcyFromIconConverter" /> | |
24 <Converters:CcyToDisplayNameConverter x:Key="CcyToDisplayNameConverter" /> | |
25 <Converters:CcyToIconConverter x:Key="CcyToIconConverter" /> | |
26 <Converters:DeltaToIconConverter x:Key="DeltaToIconConverter" /> | |
27 <Converters:AbsoluteNumberConverter x:Key="AbsoluteNumberConverter" /> | |
28 <Converters:DateTimeToTimeConverter x:Key="DateTimeToTimeConverter" /> | |
29 </Grid.Resources> | |
30 | |
31 <StackPanel Grid.Row="0" Orientation="Horizontal"> | |
32 <Button x:Name="btnServiceRunning" | |
33 Width="100" | |
34 Height="30" | |
35 Margin="5,0,0,0" | |
36 HorizontalAlignment="Left" | |
37 Command="{Binding ServiceRunningCommand, | |
38 Mode=TwoWay}" | |
39 Content="{Binding ServiceRunning, | |
40 Converter={StaticResource BoolToServiceRunningTextConverter}}" /> | |
41 <Button x:Name="btnSubscribe" | |
42 Width="100" | |
43 Height="30" | |
44 Margin="10,0,0,0" | |
45 HorizontalAlignment="Left" | |
46 Command="{Binding SubscriptionCommand, | |
47 Mode=TwoWay}" | |
48 Content="{Binding Subscribed, | |
49 Converter={StaticResource BoolToSubscribedTextConverter}}" /> | |
50 </StackPanel> | |
51 | |
52 <StackPanel Grid.Row="1" Orientation="Horizontal"> | |
53 <TextBlock Width="170" Text="Currency" /> | |
54 <TextBlock Width="100" Text="Bid" /> | |
55 <TextBlock Width="100" Text="Offer" /> | |
56 <TextBlock Width="105" Text="Change" /> | |
57 <TextBlock Width="100" Text="Spread" /> | |
58 </StackPanel> | |
59 <ListBox x:Name="lbFxRates" | |
60 Grid.Row="2" | |
61 BorderThickness="0" | |
62 FontFamily="Segoe UI" | |
63 ItemsSource="{Binding Path=DisplayFxRates}"> | |
64 <ListBox.ItemTemplate> | |
65 <DataTemplate> | |
66 <StackPanel Height="25" Orientation="Horizontal"> | |
67 <Image Width="20" Source="{Binding Ccy, Converter={StaticResource CcyFromIconConverter}}" /> | |
68 <TextBlock Width="85" | |
69 Margin="10,0,0,0" | |
70 FontSize="15" | |
71 Text="{Binding Ccy, | |
72 Converter={StaticResource CcyToDisplayNameConverter}}" /> | |
73 <Image Width="20" | |
74 Margin="10,0,27,0" | |
75 Source="{Binding Ccy, | |
76 Converter={StaticResource CcyToIconConverter}}" /> | |
77 <TextBlock Width="100" | |
78 FontSize="15" | |
79 Text="{Binding Bid}" /> | |
80 <TextBlock Width="100" | |
81 FontSize="15" | |
82 Text="{Binding Offer}" /> | |
83 <Image Width="20" Source="{Binding Delta, Converter={StaticResource DeltaToIconConverter}}" /> | |
84 <TextBlock Width="85" | |
85 FontSize="15" | |
86 Text="{Binding Delta, | |
87 Converter={StaticResource AbsoluteNumberConverter}}" /> | |
88 <TextBlock Width="100" | |
89 HorizontalAlignment="Right" | |
90 FontSize="15" | |
91 Text="{Binding Spread}" /> | |
92 <!-- <TextBlock Text="{Binding Timestamp, Converter={StaticResource DateTimeToTimeConverter}}" Width="100" FontSize="15" /> --> | |
93 </StackPanel> | |
94 </DataTemplate> | |
95 </ListBox.ItemTemplate> | |
96 </ListBox> | |
97 </Grid> | |
98 </UserControl> |