Skip to content

Commit d0b541f

Browse files
author
Yair Aichenbaum
committed
Formated XAML to match the recomended methods
1 parent 8b837fb commit d0b541f

14 files changed

+3360
-1345
lines changed

Files/Controls/FileViewControl.xaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
x:Class="Files.Controls.FileViewControl"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:local="using:Files.Controls"
65
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="using:Files.Controls"
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8-
mc:Ignorable="d"
98
d:DesignHeight="300"
10-
d:DesignWidth="400">
11-
12-
<Grid>
9+
d:DesignWidth="400"
10+
mc:Ignorable="d">
1311

14-
</Grid>
12+
<Grid />
1513
</UserControl>

Files/Controls/RibbonArea.xaml

Lines changed: 1153 additions & 464 deletions
Large diffs are not rendered by default.

Files/Controls/RibbonPage.xaml

Lines changed: 60 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,79 @@
22
x:Class="Files.Controls.RibbonPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:local="using:Files.Controls"
5+
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
66
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:local="using:Files.Controls"
78
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8-
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
9-
mc:Ignorable="d"
109
d:DesignHeight="300"
11-
d:DesignWidth="400">
10+
d:DesignWidth="400"
11+
mc:Ignorable="d">
1212
<UserControl.Resources>
1313
<Style x:Key="GridViewItemStyle1" TargetType="GridViewItem">
14-
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
15-
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
16-
<Setter Property="Background" Value="{ThemeResource GridViewItemBackground}"/>
17-
<Setter Property="Foreground" Value="{ThemeResource GridViewItemForeground}"/>
18-
<Setter Property="TabNavigation" Value="Local"/>
19-
<Setter Property="IsHoldingEnabled" Value="True"/>
20-
<Setter Property="HorizontalContentAlignment" Value="Center"/>
21-
<Setter Property="VerticalContentAlignment" Value="Center"/>
22-
<Setter Property="Margin" Value="0,0,4,4"/>
23-
<Setter Property="BorderThickness" Value="0"/>
24-
<Setter Property="MinWidth" Value="{ThemeResource GridViewItemMinWidth}"/>
25-
<Setter Property="MinHeight" Value="{ThemeResource GridViewItemMinHeight}"/>
26-
<Setter Property="AllowDrop" Value="False"/>
27-
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}"/>
28-
<Setter Property="FocusVisualMargin" Value="-2"/>
14+
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
15+
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
16+
<Setter Property="Background" Value="{ThemeResource GridViewItemBackground}" />
17+
<Setter Property="Foreground" Value="{ThemeResource GridViewItemForeground}" />
18+
<Setter Property="TabNavigation" Value="Local" />
19+
<Setter Property="IsHoldingEnabled" Value="True" />
20+
<Setter Property="HorizontalContentAlignment" Value="Center" />
21+
<Setter Property="VerticalContentAlignment" Value="Center" />
22+
<Setter Property="Margin" Value="0,0,4,4" />
23+
<Setter Property="BorderThickness" Value="0" />
24+
<Setter Property="MinWidth" Value="{ThemeResource GridViewItemMinWidth}" />
25+
<Setter Property="MinHeight" Value="{ThemeResource GridViewItemMinHeight}" />
26+
<Setter Property="AllowDrop" Value="False" />
27+
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
28+
<Setter Property="FocusVisualMargin" Value="-2" />
2929
<Setter Property="Template">
3030
<Setter.Value>
3131
<ControlTemplate TargetType="GridViewItem">
32-
<ListViewItemPresenter BorderThickness="0" x:Name="Root" CheckBrush="{ThemeResource GridViewItemCheckBrush}" ContentMargin="{TemplateBinding Padding}" CheckBoxBrush="{ThemeResource GridViewItemCheckBoxBrush}" ContentTransitions="{TemplateBinding ContentTransitions}" CheckMode="{ThemeResource GridViewItemCheckMode}" DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" DragBackground="{ThemeResource GridViewItemDragBackground}" DragForeground="{ThemeResource GridViewItemDragForeground}" FocusBorderBrush="{ThemeResource GridViewItemFocusBorderBrush}" FocusVisualMargin="{TemplateBinding FocusVisualMargin}" FocusSecondaryBorderBrush="{ThemeResource GridViewItemFocusSecondaryBorderBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Control.IsTemplateFocusTarget="True" PressedBackground="{ThemeResource GridViewItemBackgroundPressed}" PlaceholderBackground="{ThemeResource GridViewItemPlaceholderBackground}" PointerOverForeground="{ThemeResource GridViewItemForegroundPointerOver}" PointerOverBackground="{ThemeResource GridViewItemBackgroundPointerOver}" RevealBorderThickness="0" ReorderHintOffset="{ThemeResource GridViewItemReorderHintThemeOffset}" RevealBorderBrush="{ThemeResource GridViewItemRevealBorderBrush}" RevealBackground="{ThemeResource GridViewItemRevealBackground}" SelectedForeground="{ThemeResource GridViewItemForegroundSelected}" SelectionCheckMarkVisualEnabled="{ThemeResource GridViewItemSelectionCheckMarkVisualEnabled}" SelectedBackground="{ThemeResource GridViewItemBackgroundSelected}" SelectedPressedBackground="{ThemeResource GridViewItemBackgroundSelectedPressed}" SelectedPointerOverBackground="{ThemeResource GridViewItemBackgroundSelectedPointerOver}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
32+
<ListViewItemPresenter
33+
x:Name="Root"
34+
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
35+
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
36+
BorderThickness="0"
37+
CheckBoxBrush="{ThemeResource GridViewItemCheckBoxBrush}"
38+
CheckBrush="{ThemeResource GridViewItemCheckBrush}"
39+
CheckMode="{ThemeResource GridViewItemCheckMode}"
40+
ContentMargin="{TemplateBinding Padding}"
41+
ContentTransitions="{TemplateBinding ContentTransitions}"
42+
Control.IsTemplateFocusTarget="True"
43+
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
44+
DragBackground="{ThemeResource GridViewItemDragBackground}"
45+
DragForeground="{ThemeResource GridViewItemDragForeground}"
46+
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
47+
FocusBorderBrush="{ThemeResource GridViewItemFocusBorderBrush}"
48+
FocusSecondaryBorderBrush="{ThemeResource GridViewItemFocusSecondaryBorderBrush}"
49+
FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
50+
PlaceholderBackground="{ThemeResource GridViewItemPlaceholderBackground}"
51+
PointerOverBackground="{ThemeResource GridViewItemBackgroundPointerOver}"
52+
PointerOverForeground="{ThemeResource GridViewItemForegroundPointerOver}"
53+
PressedBackground="{ThemeResource GridViewItemBackgroundPressed}"
54+
ReorderHintOffset="{ThemeResource GridViewItemReorderHintThemeOffset}"
55+
RevealBackground="{ThemeResource GridViewItemRevealBackground}"
56+
RevealBorderBrush="{ThemeResource GridViewItemRevealBorderBrush}"
57+
RevealBorderThickness="0"
58+
SelectedBackground="{ThemeResource GridViewItemBackgroundSelected}"
59+
SelectedForeground="{ThemeResource GridViewItemForegroundSelected}"
60+
SelectedPointerOverBackground="{ThemeResource GridViewItemBackgroundSelectedPointerOver}"
61+
SelectedPressedBackground="{ThemeResource GridViewItemBackgroundSelectedPressed}"
62+
SelectionCheckMarkVisualEnabled="{ThemeResource GridViewItemSelectionCheckMarkVisualEnabled}">
3363
<VisualStateManager.VisualStateGroups>
3464
<VisualStateGroup x:Name="CommonStates">
35-
<VisualState x:Name="Normal"/>
36-
<VisualState x:Name="Selected"/>
37-
<VisualState x:Name="PointerOver"/>
38-
<VisualState x:Name="PointerOverSelected"/>
39-
<VisualState x:Name="PointerOverPressed"/>
40-
<VisualState x:Name="Pressed"/>
41-
<VisualState x:Name="PressedSelected"/>
65+
<VisualState x:Name="Normal" />
66+
<VisualState x:Name="Selected" />
67+
<VisualState x:Name="PointerOver" />
68+
<VisualState x:Name="PointerOverSelected" />
69+
<VisualState x:Name="PointerOverPressed" />
70+
<VisualState x:Name="Pressed" />
71+
<VisualState x:Name="PressedSelected" />
4272
</VisualStateGroup>
4373
<VisualStateGroup x:Name="DisabledStates">
44-
<VisualState x:Name="Enabled"/>
74+
<VisualState x:Name="Enabled" />
4575
<VisualState x:Name="Disabled">
4676
<VisualState.Setters>
47-
<Setter Target="Root.RevealBorderThickness" Value="0"/>
77+
<Setter Target="Root.RevealBorderThickness" Value="0" />
4878
</VisualState.Setters>
4979
</VisualState>
5080
</VisualStateGroup>
@@ -56,7 +86,5 @@
5686
</Style>
5787
</UserControl.Resources>
5888

59-
<controls:WrapPanel Orientation="Horizontal" x:Name="PageContentPanel">
60-
61-
</controls:WrapPanel>
89+
<controls:WrapPanel x:Name="PageContentPanel" Orientation="Horizontal" />
6290
</UserControl>

0 commit comments

Comments
 (0)