-
Notifications
You must be signed in to change notification settings - Fork 498
/
CoinListView.xaml
86 lines (80 loc) · 5.05 KB
/
CoinListView.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui"
xmlns:converters="clr-namespace:WalletWasabi.Gui.Converters;assembly=WalletWasabi.Gui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<converters:PrivacyLevelValueConverter x:Key="PrivacyLevelValueConverter" />
<converters:CoinStatusStringConverter x:Key="CoinStatusStringConverter" />
<converters:CoinStatusColorConverter x:Key="CoinStatusColorConverter" />
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="TextBox.Transaparent">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="ListBoxItem:selected:focus /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</UserControl.Styles>
<DockPanel LastChildFill="True">
<Grid ColumnDefinitions="30,30,100,100,100,Auto" Margin="35 0" DockPanel.Dock="Top">
<TextBlock Text="" />
<TextBlock Text="" Grid.Column="1" />
<TextBlock Text="Amount (BTC)" Grid.Column="2" />
<TextBlock Text="Privacy" Grid.Column="3" Margin="20 0 0 0" />
<TextBlock Text="Status" Grid.Column="4" />
<TextBlock Text="History" Grid.Column="5" />
</Grid>
<ListBox Items="{Binding Coins}" VirtualizationMode="None">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Expander ExpandDirection="Down">
<StackPanel Background="{DynamicResource ThemeControlBackgroundBrush}">
<Grid HorizontalAlignment="Left" ColumnDefinitions="150, *" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" MaxWidth="800">
<TextBlock Text="Transaction Id:" Grid.Row="0" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding TransactionId}" Background="Transparent" Grid.Column="1" Grid.Row="0" />
<TextBlock Text="Output Index:" Grid.Row="1" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding OutputIndex}" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="Label:" Grid.Row="2" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding Label}" Grid.Column="1" Grid.Row="2" />
<TextBlock Text="Address:" Grid.Row="3" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding Address}" Grid.Column="1" Grid.Row="3" />
<TextBlock Text="Confirmations:" Grid.Row="4" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding Confirmations}" Grid.Column="1" Grid.Row="4" />
<TextBlock Text="Anonymity Set:" Grid.Row="5" />
<controls:ExtendedTextBox Classes="selectableTextBlock Transaparent" Text="{Binding AnonymitySet}" Grid.Column="1" Grid.Row="5" />
</Grid>
</StackPanel>
</Expander>
<Grid ColumnDefinitions="30,30,100,100,100,Auto" Margin="30 0 0 0" VerticalAlignment="Top">
<CheckBox HorizontalContentAlignment="Left" IsChecked="{Binding IsSelected}" />
<Path HorizontalAlignment="Left" Grid.Column="1" Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z" Fill="#22B14C" Height="16" Width="16" IsVisible="{Binding Confirmed}" Stretch="Fill">
<ToolTip.Tip>
Confimed
</ToolTip.Tip>
</Path>
<TextBlock Grid.Column="2" Text="{Binding AmountBtc}" />
<Panel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center"
DataContext="{Binding AnonymitySet, Converter={StaticResource PrivacyLevelValueConverter}}"
ToolTip.Tip="{Binding ToolTip}">
<DrawingPresenter Drawing="{Binding Icon}" Margin="0 0 25 0" />
</Panel>
<controls:ExtendedTextBox Classes="selectableTextBlock" Grid.Column="4" Text="{Binding Status, Converter={StaticResource CoinStatusStringConverter}}" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}"/>
<controls:ExtendedTextBox Classes="selectableTextBlock" Grid.Column="5" Text="{Binding History}" />
<TextBlock Text="" Grid.Column="6" />
</Grid>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</UserControl>