Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup & folder structure improvements #1732

Merged
merged 29 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9904297
Cleanup
niels9001 Jan 28, 2025
abd5e96
Moving a lot of stuff around
niels9001 Jan 28, 2025
d789828
More changes!
niels9001 Jan 28, 2025
3e525b6
Fixes
niels9001 Jan 28, 2025
ce054d5
Merge branch 'main' into user/niels9001/cleanup
niels9001 Jan 28, 2025
94bb9ac
Move XAML fundamentals content to new folder
niels9001 Jan 28, 2025
34b23cf
Namespace fixes
niels9001 Jan 28, 2025
ddf3f32
More namespace changes
niels9001 Jan 28, 2025
7cf469e
Even more namespace fixes!
niels9001 Jan 28, 2025
235f8c1
It compiles!
niels9001 Jan 28, 2025
35ba29a
More fixes
niels9001 Jan 28, 2025
d457820
Namespace changes
niels9001 Jan 28, 2025
db67f87
Moving more stuff around
niels9001 Jan 28, 2025
093d648
Changes
niels9001 Jan 28, 2025
5f1f8d4
More changes
niels9001 Jan 29, 2025
352348a
More changes
niels9001 Jan 29, 2025
7bc842a
Hyperlink spacing fixes
niels9001 Jan 29, 2025
0c99d60
Update AnimatedVisualPlayerPage.xaml
niels9001 Jan 29, 2025
0507430
Fix tests and adding back WrapPanel
niels9001 Jan 29, 2025
0ec5631
Changes for 1733
niels9001 Jan 29, 2025
2763dbe
Merge branch 'main' into user/niels9001/cleanup
marcelwgn Jan 29, 2025
fe1db1e
Moving even more stuff around
niels9001 Jan 29, 2025
bcbe70b
Moving images
niels9001 Jan 29, 2025
77f0d46
Update ContentIncludes.props
niels9001 Jan 29, 2025
14b819f
Update UITests.csproj
niels9001 Jan 29, 2025
619035c
Merge branch 'main' into user/niels9001/cleanup
niels9001 Feb 5, 2025
b0a1daf
Fix merge conflicts
niels9001 Feb 5, 2025
c447865
Fix ninegrid.gif regression and moving data to samples folder
niels9001 Feb 5, 2025
1477cad
Fix CI
niels9001 Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions UITests/UITests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\WinUIGallery\DataModel\ControlInfoData.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\WinUIGallery\Samples\Data\ControlInfoData.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
193 changes: 20 additions & 173 deletions WinUIGallery/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
x:Class="WinUIGallery.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="using:WinUIGallery.Common"
xmlns:converters="using:WinUIGallery.Converters"
xmlns:local="using:WinUIGallery">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<local:ItemTemplates />
<XamlControlsResources />
<ResourceDictionary Source="/Controls/CopyButton/CopyButton.xaml" />
<local:ItemTemplates />
<ResourceDictionary Source="/Controls/CopyButton.xaml" />
<ResourceDictionary Source="/Styles/Button.xaml" />
<ResourceDictionary Source="/Styles/Grid.xaml" />
<ResourceDictionary Source="/Styles/GridViewItem.xaml" />
<ResourceDictionary Source="/Styles/TextBlock.xaml" />
</ResourceDictionary.MergedDictionaries>

<ResourceDictionary.ThemeDictionaries>
Expand All @@ -44,182 +48,25 @@
<!-- Application-specific resources -->
<x:String x:Key="ControlsName">All samples</x:String>
<x:String x:Key="AppTitleName">WinUI 3 Gallery</x:String>

<common:NullableBooleanToBooleanConverter x:Key="nullableBooleanToBooleanConverter" />
<common:NullToVisibilityConverter x:Key="nullToVisibilityConverter" />
<common:EmptyStringToVisibilityConverter x:Key="emptyStringToVisibilityConverter" />
<common:NullToVisibilityConverter
x:Key="inverseNullToVisibilityConverter"
NonNullValue="Collapsed"
NullValue="Visible" />
<common:BooleanToValueConverter x:Key="booleanToValueConverter" />
<common:DoubleToThicknessConverter x:Key="doubleToThicknessConverter" />

<!-- Breakpoints -->
<x:String x:Key="GitHubIconPath">M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z</x:String>
<x:String x:Key="TemplateStudioIconPath">M39,30l-15,7.5-5-2.5v-9l-4-2v9l-3-1.5v-14.944l12,5.944,15.034-7.447L24,3.831,9,15.027v14.973L0,34.5l24,12,24-12-9-4.5ZM24,7.575v11.577l-9.323-4.618,9.323-6.959Z</x:String>
<x:Double x:Key="Breakpoint640Plus">641</x:Double>
<x:Double x:Key="ColorSectionSpacing">4</x:Double>

<!-- Style Overrides -->
<SolidColorBrush x:Key="GridViewHeaderItemDividerStroke" Color="Transparent" />
<x:Double x:Key="TeachingTipMinWidth">48</x:Double>

<!-- Application-specific styles -->
<Style
x:Key="OutputTextBlockStyle"
BasedOn="{StaticResource BodyTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Margin" Value="8,8,0,0" />
</Style>

<Style
x:Key="GridViewItemStyle"
BasedOn="{StaticResource DefaultGridViewItemStyle}"
TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,12,12" />
</Style>

<Style
x:Key="IndentedGridViewItemStyle"
BasedOn="{StaticResource DefaultGridViewItemStyle}"
TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,0,12" />
</Style>

<Style
x:Key="GridViewItemStyleSmall"
BasedOn="{StaticResource DefaultGridViewItemStyle}"
TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,0,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>

<Style
x:Key="IndentedGridViewItemStyleSmall"
BasedOn="{StaticResource DefaultGridViewItemStyle}"
TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,12,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>

<Style x:Key="GalleryTileGridStyle" TargetType="Grid">
<Setter Property="Background" Value="{ThemeResource GalleryBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource GalleryBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}" />
</Style>

<Style x:Key="DesignRowCardStyle" TargetType="Grid">
<Style.Setters>
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="68" />
<Setter Property="CornerRadius" Value="{StaticResource ControlCornerRadius}" />
</Style.Setters>
</Style>

<Style
x:Key="DesignRowLightCardStyle"
BasedOn="{StaticResource DesignRowCardStyle}"
TargetType="Grid">
<Style.Setters>
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
</Style.Setters>
</Style>

<x:Double x:Key="ColorSectionSpacing">4</x:Double>

<Style x:Key="SubtleButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource SubtleFillColorTransparent}" />
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimary}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="FocusVisualMargin" Value="-3" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter
x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AnimatedIcon.State="Normal"
AutomationProperties.AccessibilityView="Raw"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter.BackgroundTransition>
<BrushTransition Duration="0:0:0.083" />
</ContentPresenter.BackgroundTransition>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorSecondary}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorPrimary}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
</VisualState.Setters>
</VisualState>

<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorTertiary}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorSecondary}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
</VisualState.Setters>
</VisualState>

<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlFillColorDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorDisabled}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<!-- DisabledVisual Should be handled by the control, not the animated icon. -->
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Normal" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- Icon Paths -->
<x:String x:Key="GitHubIconPath">M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z</x:String>

<x:String x:Key="TemplateStudioIconPath">M39,30l-15,7.5-5-2.5v-9l-4-2v9l-3-1.5v-14.944l12,5.944,15.034-7.447L24,3.831,9,15.027v14.973L0,34.5l24,12,24-12-9-4.5ZM24,7.575v11.577l-9.323-4.618,9.323-6.959Z</x:String>

<!-- Converters -->
<converters:NullableBooleanToBooleanConverter x:Key="nullableBooleanToBooleanConverter" />
<converters:NullToVisibilityConverter x:Key="nullToVisibilityConverter" />
<converters:EmptyStringToVisibilityConverter x:Key="emptyStringToVisibilityConverter" />
<converters:NullToVisibilityConverter
x:Key="inverseNullToVisibilityConverter"
NonNullValue="Collapsed"
NullValue="Visible" />
<converters:BooleanToValueConverter x:Key="booleanToValueConverter" />
<converters:DoubleToThicknessConverter x:Key="doubleToThicknessConverter" />
</ResourceDictionary>
</Application.Resources>
</Application>
9 changes: 4 additions & 5 deletions WinUIGallery/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using WinUIGallery.Common;
using WinUIGallery.Data;
using WinUIGallery.Helper;
using WinUIGallery.Models;
using WinUIGallery.Helpers;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.Windows.AppLifecycle;
using Windows.ApplicationModel.Activation;
using WinUIGallery.DesktopWap.DataModel;
using WASDK = Microsoft.WindowsAppSDK;
using Microsoft.Windows.AppNotifications;
using Microsoft.Windows.AppNotifications.Builder;
using System.Collections.Generic;
using static WinUIGallery.Win32;
using static WinUIGallery.Helpers.Win32;
using WinUIGallery.Pages;

namespace WinUIGallery;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Microsoft.Graphics.Canvas.Geometry;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Numerics;
using Microsoft.UI;
using Microsoft.Graphics.Canvas.Geometry;
using Microsoft.UI.Composition;
using Microsoft.UI.Xaml.Controls;

namespace AnimatedVisuals;

Expand Down
Binary file removed WinUIGallery/Assets/LottieLogo1.png
Binary file not shown.
Loading