-
Notifications
You must be signed in to change notification settings - Fork 498
/
ReceiveTabView.xaml
95 lines (92 loc) · 5.15 KB
/
ReceiveTabView.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
87
88
89
90
91
92
93
94
95
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:behaviors="clr-namespace:WalletWasabi.Gui.Behaviors;assembly=WalletWasabi.Gui"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:iac="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions.Custom"
xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui"
Name="ReceiveTabViewerUserControl">
<i:Interaction.Behaviors>
<behaviors:ClearPropertyOnLostFocusBehavior TargetProperty="{Binding SelectedAddress}" />
</i:Interaction.Behaviors>
<controls:GroupBox Title="{Binding Title}" TextBlock.FontSize="30" Padding="20" Margin="10">
<Grid Classes="content">
<DockPanel LastChildFill="True">
<Grid RowDefinitions="Auto,*" DockPanel.Dock="Top">
<DockPanel LastChildFill="True">
<Grid ColumnDefinitions="*,300" DockPanel.Dock="Top" Margin="0 0 0 10">
<controls:ExtendedTextBox Text="{Binding Label, Mode=TwoWay}" Watermark="Label (Required)" UseFloatingWatermark="True" Grid.Column="0" Margin="0 0 10 0">
<i:Interaction.Behaviors>
<behaviors:SuggestionBehavior SuggestionItems="{Binding Suggestions}" />
<behaviors:CommandOnEnterBehavior Command="{Binding GenerateCommand}" />
<behaviors:FocusBehavior IsFocused="{Binding IsSelected}" />
<iac:FocusOnAttachedToVisualTreeBehavior />
</i:Interaction.Behaviors>
<ToolTip.Tip>
Start labelling today and your privacy will thank you tomorrow!
</ToolTip.Tip>
</controls:ExtendedTextBox>
<Button Content="Generate Receive Address" Command="{Binding GenerateCommand}" VerticalAlignment="Top" Grid.Column="1" />
</Grid>
<Grid IsVisible="{Binding LabelRequiredNotificationVisible}">
<Grid Opacity="{Binding LabelRequiredNotificationOpacity}">
<Grid.Transitions>
<DoubleTransition Property="Opacity"
Easing="CircularEaseIn"
Duration="0:0:0.5" />
</Grid.Transitions>
<TextBlock Classes="warningMessage" Text="Label Is Required!" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
</Grid>
<Grid IsVisible="{Binding ClipboardNotificationVisible}">
<Grid Opacity="{Binding ClipboardNotificationOpacity}">
<Grid.Transitions>
<DoubleTransition Property="Opacity"
Easing="CircularEaseIn"
Duration="0:0:0.5" />
</Grid.Transitions>
<TextBlock Text="Address Is Copied To Clipboard!" Foreground="#22B14C" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
</Grid>
</DockPanel>
<Grid ColumnDefinitions="300, *, 50" Margin="5 10 5 0" Grid.Row="1">
<TextBlock Text="Label:" />
<TextBlock Text="Address:" Grid.Column="1" Margin="20 0 0 0" />
</Grid>
<ListBox Grid.Row="2" Items="{Binding Addresses}" SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" VirtualizationMode="None">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Expander ExpandDirection="Down" IsExpanded="{Binding IsExpanded}">
<Panel>
<Panel Width="240" Background="#FFFEFEFE">
<controls:QrCode Matrix="{Binding QrCode}" HorizontalAlignment="Center" Margin="20" />
</Panel>
<controls:Spinner Height="100" Width="100" IsVisible="{Binding IsBusy}" />
</Panel>
</Expander>
<Grid ColumnDefinitions="400, *, 100" Margin="30 0 0 0">
<TextBlock Text="{Binding Address}" >
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Header="_Copy" Command="{Binding CopyToClipboard}" >
<MenuItem.Icon>
<DrawingPresenter Height="16" Width="16">
<DrawingPresenter.Drawing>
<GeometryDrawing Brush="#FFFFFFFF" Geometry="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" />
</DrawingPresenter.Drawing>
</DrawingPresenter>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
<TextBlock Text="{Binding Label}" Grid.Column="1" />
</Grid>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</DockPanel>
</Grid>
</controls:GroupBox>
</UserControl>