-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPopUp.XAML
105 lines (89 loc) · 4.52 KB
/
PopUp.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
96
97
98
99
100
101
102
<UserControl x:Class="Equity_Order_Book.AppSelectionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Equity_Order_Book"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Background="Transparent" >
<UserControl.Resources>
<local:GroupingTitleInstanceConverter x:Key="GroupingTitleInstanceConverter"/>
<local:DisplayTitleInstanceConverter x:Key="DisplayTitleInstanceConverter"/>
<local:StringToImageSourceConverter x:Key="StringToImageSourceConverter"/>
</UserControl.Resources>
<Border Background="Gray" CornerRadius="20" ClipToBounds="True" Padding="7">
<StackPanel Background="Gray" >
<TextBlock x:Name ="IntentResolverTextBox"
FontSize="20"
FontFamily="Lucida Sans Unicode"
VerticalAlignment="Top"
Foreground="White"
HorizontalAlignment="Center" />
<ListBox x:Name="appListBox"
SelectionMode="Single"
Opacity="1"
HorizontalAlignment="Stretch"
Width="442"
Height="417">
<!-- GroupStyle to display group headers -->
<ListBox.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<Border Background="LightGray" CornerRadius="5" Padding="5" Margin="2">
<TextBlock Text="{Binding Name}" FontWeight="Bold" />
</Border>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListBox.GroupStyle>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border Name="Border" BorderBrush="Gray" BorderThickness="0,0,0,1">
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<!-- First Image -->
<ColumnDefinition Width="*"/>
<!-- TextBlock and Spacer -->
<ColumnDefinition Width="Auto"/>
<!-- Second Image -->
</Grid.ColumnDefinitions>
<Image Grid.Column="0"
Source="{Binding FirstIconSrc}"
Width="30"
Height="30"
Margin="3"/>
<TextBlock Grid.Column="1"
Margin="3"
Padding="3"
FontFamily="Lucida Sans Unicode"
FontSize="15"
Text="{Binding Path=., Converter={StaticResource DisplayTitleInstanceConverter}}"
x:Name="appNameTextBlock"/>
<Image Grid.Column="2"
Width="30"
Height="30"
Loaded="OnImageLoaded"
Margin="10"
HorizontalAlignment="Right">
</Image>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Border>
</UserControl>