|
1 | 1 | <!--
|
2 |
| -//********************************************************* |
3 |
| -// |
4 |
| -// Copyright (c) Microsoft. All rights reserved. |
5 |
| -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF |
6 |
| -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY |
7 |
| -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR |
8 |
| -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. |
9 |
| -// |
10 |
| -//********************************************************* |
| 2 | + //********************************************************* |
| 3 | + // |
| 4 | + // Copyright (c) Microsoft. All rights reserved. |
| 5 | + // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF |
| 6 | + // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY |
| 7 | + // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR |
| 8 | + // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. |
| 9 | + // |
| 10 | + //********************************************************* |
11 | 11 | -->
|
12 | 12 | <Page
|
13 | 13 | x:Class="AppUIBasics.ControlPages.SemanticZoomPage"
|
14 | 14 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
15 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
16 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
17 | 15 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
18 |
| - xmlns:local="using:AppUIBasics" |
| 16 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
19 | 17 | xmlns:data="using:AppUIBasics.Data"
|
| 18 | + xmlns:local="using:AppUIBasics" |
| 19 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
20 | 20 | xmlns:wuxdata="using:Microsoft.UI.Xaml.Data"
|
21 | 21 | mc:Ignorable="d">
|
22 | 22 | <Page.Resources>
|
23 |
| - <CollectionViewSource x:Name="cvsGroups" Source="{x:Bind Groups}" IsSourceGrouped="True" ItemsPath="Items" |
24 |
| - d:Source="{Binding Groups, Source={d:DesignData Source=/DataModel/ControlInfoData.json, Type=data:ControlInfoDataSource}}"/> |
| 23 | + <CollectionViewSource |
| 24 | + x:Name="cvsGroups" |
| 25 | + d:Source="{Binding Groups, Source={d:DesignData Source=/DataModel/ControlInfoData.json, Type=data:ControlInfoDataSource}}" |
| 26 | + IsSourceGrouped="True" |
| 27 | + ItemsPath="Items" |
| 28 | + Source="{x:Bind Groups}" /> |
25 | 29 |
|
26 | 30 | <DataTemplate x:Key="ZoomedInTemplate" x:DataType="data:ControlInfoDataItem">
|
27 |
| - <StackPanel Orientation="Horizontal" MinWidth="200" Margin="12,6,12,6"> |
28 |
| - <StackPanel Margin="20,0,0,0"> |
29 |
| - <TextBlock Text="{x:Bind Title}" Style="{StaticResource BaseTextBlockStyle}"/> |
30 |
| - <TextBlock Text="{x:Bind Subtitle}" TextWrapping="Wrap" HorizontalAlignment="Left" Width="300" Style="{StaticResource BodyTextBlockStyle}"/> |
31 |
| - </StackPanel> |
| 31 | + <StackPanel MinWidth="200" Margin="12,6,12,6"> |
| 32 | + <TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{x:Bind Title}" /> |
| 33 | + <TextBlock |
| 34 | + Width="300" |
| 35 | + HorizontalAlignment="Left" |
| 36 | + Style="{StaticResource BodyTextBlockStyle}" |
| 37 | + Text="{x:Bind Subtitle}" |
| 38 | + TextWrapping="Wrap" /> |
32 | 39 | </StackPanel>
|
33 | 40 | </DataTemplate>
|
34 | 41 |
|
35 | 42 | <DataTemplate x:Key="ZoomedInGroupHeaderTemplate" x:DataType="data:ControlInfoDataGroup">
|
36 |
| - <TextBlock Text="{x:Bind Title}" Foreground="{ThemeResource ApplicationForegroundThemeBrush}" Style="{StaticResource SubtitleTextBlockStyle}"/> |
| 43 | + <TextBlock |
| 44 | + Foreground="{ThemeResource ApplicationForegroundThemeBrush}" |
| 45 | + Style="{StaticResource SubtitleTextBlockStyle}" |
| 46 | + Text="{x:Bind Title}" /> |
37 | 47 | </DataTemplate>
|
38 | 48 |
|
39 | 49 | <DataTemplate x:Key="ZoomedOutTemplate" x:DataType="wuxdata:ICollectionViewGroup">
|
40 |
| - <TextBlock Text="{x:Bind ((data:ControlInfoDataGroup)Group).Title}" Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="Wrap"/> |
| 50 | + <TextBlock |
| 51 | + Style="{StaticResource SubtitleTextBlockStyle}" |
| 52 | + Text="{x:Bind ((data:ControlInfoDataGroup)Group).Title}" |
| 53 | + TextWrapping="Wrap" /> |
41 | 54 | </DataTemplate>
|
42 | 55 | </Page.Resources>
|
43 | 56 |
|
44 | 57 | <StackPanel>
|
45 |
| - <local:ControlExample HeaderText="A simple SemanticZoom" x:Name="Example1"> |
| 58 | + <local:ControlExample x:Name="Example1" HeaderText="A simple SemanticZoom"> |
46 | 59 | <SemanticZoom x:Name="Control1" Height="500">
|
47 | 60 | <SemanticZoom.ZoomedInView>
|
48 |
| - <GridView ItemsSource="{x:Bind cvsGroups.View}" ScrollViewer.IsHorizontalScrollChainingEnabled="False" SelectionMode="None" GotFocus="List_GotFocus" |
49 |
| - ItemTemplate="{StaticResource ZoomedInTemplate}"> |
| 61 | + <GridView |
| 62 | + GotFocus="List_GotFocus" |
| 63 | + ItemTemplate="{StaticResource ZoomedInTemplate}" |
| 64 | + ItemsSource="{x:Bind cvsGroups.View}" |
| 65 | + ScrollViewer.IsHorizontalScrollChainingEnabled="False" |
| 66 | + SelectionMode="None"> |
50 | 67 | <GridView.GroupStyle>
|
51 | 68 | <GroupStyle HeaderTemplate="{StaticResource ZoomedInGroupHeaderTemplate}" />
|
52 | 69 | </GridView.GroupStyle>
|
53 | 70 | </GridView>
|
54 | 71 | </SemanticZoom.ZoomedInView>
|
55 | 72 |
|
56 | 73 | <SemanticZoom.ZoomedOutView>
|
57 |
| - <ListView ItemsSource="{x:Bind cvsGroups.View.CollectionGroups}" SelectionMode="None" ItemTemplate="{StaticResource ZoomedOutTemplate}" GotFocus="List_GotFocus" /> |
| 74 | + <ListView |
| 75 | + GotFocus="List_GotFocus" |
| 76 | + ItemTemplate="{StaticResource ZoomedOutTemplate}" |
| 77 | + ItemsSource="{x:Bind cvsGroups.View.CollectionGroups}" |
| 78 | + SelectionMode="None" /> |
58 | 79 | </SemanticZoom.ZoomedOutView>
|
59 | 80 | </SemanticZoom>
|
60 | 81 | <local:ControlExample.Xaml>
|
|
0 commit comments