-
-
Notifications
You must be signed in to change notification settings - Fork 520
/
ImagesViewer.xaml
81 lines (76 loc) · 3.56 KB
/
ImagesViewer.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
<UserControl x:Class="FluentTest.ImagesViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fluent="urn:fluent-ribbon"
xmlns:fluentTest="clr-namespace:FluentTest"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance fluentTest:ImagesViewerDesignTimeData,
IsDesignTimeCreatable=True}"
d:DesignHeight="1280"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.DataContext>
<fluentTest:ImagesViewerDesignTimeData />
</UserControl.DataContext>
<Grid>
<ItemsControl Background="Transparent"
Grid.IsSharedSizeScope="True"
ItemsSource="{Binding Data}">
<ItemsControl.Template>
<ControlTemplate>
<ScrollViewer Padding="{TemplateBinding Padding}">
<ItemsPresenter />
</ScrollViewer>
</ControlTemplate>
</ItemsControl.Template>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="4 0 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"
SharedSizeGroup="S16" />
<ColumnDefinition Width="Auto"
SharedSizeGroup="S32" />
<ColumnDefinition Width="Auto"
SharedSizeGroup="S48" />
<ColumnDefinition Width="Auto"
SharedSizeGroup="S64" />
<ColumnDefinition Width="Auto"
SharedSizeGroup="Label" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="4"
Margin="4 0 0 0"
VerticalAlignment="Center"
Text="{Binding Key}" />
<Image Grid.Column="0"
Width="16"
Height="16"
Margin="2"
Source="{Binding Value}" />
<Image Grid.Column="1"
Width="32"
Height="32"
Margin="2"
Source="{Binding Value}" />
<Image Grid.Column="2"
Width="48"
Height="48"
Margin="2"
Source="{Binding Value}" />
<Image Grid.Column="3"
Width="64"
Height="64"
Margin="2"
Source="{Binding Value}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>