Skip to content

Commit

Permalink
Merge branch 'main' into betterSettingsControls
Browse files Browse the repository at this point in the history
  • Loading branch information
ProJend authored Dec 26, 2024
2 parents f05799a + dba2322 commit f420b40
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 13 deletions.
4 changes: 0 additions & 4 deletions Windows.Toolkit.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,4 @@
<IsPublishable>true</IsPublishable>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(RepositoryDirectory)tooling\GlobalUsings.cs" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions components/ColorPicker/src/ColorPicker.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
xmlns:contract8Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,8)"
Expand All @@ -16,6 +16,7 @@
<SolidColorBrush x:Key="CheckerboardColor1"
Color="#FFd4d4d4" />
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
<localconverters:NullToTransparentConverter x:Key="NullToTransparentConverter" />
<localconverters:ColorToHexConverter x:Key="ColorToHexConverter" />

<localconverters:ContrastBrushConverter x:Key="ContrastBrushConverter" />
Expand Down Expand Up @@ -291,7 +292,7 @@
animations:Implicit.HideAnimations="{StaticResource HideTransitions}"
animations:Implicit.ShowAnimations="{StaticResource ShowTransitions}"
ItemsSource="{TemplateBinding CustomPaletteColors}"
SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Mode=TwoWay}"
SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource NullToTransparentConverter}, Mode=TwoWay}"
SelectionMode="Single"
Tag="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Mode=OneWay}">
<GridView.ItemsPanel>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace CommunityToolkit.WinUI.Controls;

/// <summary>
/// Value converter that converts null values to Transparent.
/// </summary>
public partial class NullToTransparentConverter : IValueConverter
{
/// <inheritdoc/>
public object Convert(object value, Type targetType, object parameter, string language) => value;

/// <inheritdoc/>
public object ConvertBack(object? value, Type targetType, object parameter, string language) => value ??
#if WINUI2
Windows.UI.Colors.Transparent;
#else
Microsoft.UI.Colors.Transparent;
#endif
}
4 changes: 2 additions & 2 deletions components/ImageCropper/src/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Project>
<!-- WinUI 2 / UWP -->
<ItemGroup Condition="'$(IsUwp)' == 'true'">
<PackageReference Include="Win2D.uwp" Version="1.28.0"/>
<PackageReference Include="Win2D.uwp" Version="1.28.1"/>
</ItemGroup>

<!-- WinUI 2 / Uno -->
Expand All @@ -21,7 +21,7 @@

<!-- WinUI 3 / WinAppSdk -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true'">
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.0"/>
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.1"/>
</ItemGroup>

<!-- WinUI 3 / Uno -->
Expand Down
11 changes: 7 additions & 4 deletions components/Media/src/Dependencies.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
WinUI 2 under UWP uses TargetFramework uap10.0.*
WinUI 2 under UWP uses TargetFramework uap10.0.* or net8.0-windows10.*
WinUI 3 under WinAppSdk uses TargetFramework net6.0-windows10.*
However, under Uno-powered platforms, both WinUI 2 and 3 can share the same TargetFramework.
Expand All @@ -11,12 +11,15 @@
<Project>
<!-- WinUI 2 / UWP -->
<ItemGroup Condition="'$(IsUwp)' == 'true'">
<PackageReference Include="Win2D.uwp" Version="1.28.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
<PackageReference Include="Win2D.uwp" Version="1.28.1" />

<!-- Only include this polyfill package when not targeting .NET 8 or above -->
<PackageReference Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"
Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
</ItemGroup>

<!-- WinUI 3 / WinAppSdk -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true'">
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.0" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion tooling
Submodule tooling updated 28 files
+0 −4 .github/workflows/config/Directory.Build.props
+4 −4 Build-Toolkit-Components.ps1
+18 −0 MultiTarget/AvailableMultiTargets.props
+16 −9 MultiTarget/AvailableTargetFrameworks.props
+3 −10 MultiTarget/EnabledMultiTargets.props
+23 −22 MultiTarget/EnabledTargetFrameworks.props
+40 −0 MultiTarget/Extra.props
+6 −0 MultiTarget/GlobalUsings.props
+7 −4 MultiTarget/Library.props
+46 −25 MultiTarget/MultiTargetIdentifiers.props
+0 −31 MultiTarget/MultiTargetToTargetFramework.props
+13 −68 MultiTarget/UseTargetFrameworks.ps1
+0 −58 MultiTarget/WinUI.Extra.props
+3 −0 ProjectHeads/AllComponents/Tests.Uwp/CommunityToolkit.Tests.Uwp.csproj
+3 −0 ProjectHeads/AllComponents/Tests.Wasdk/CommunityToolkit.Tests.Wasdk.csproj
+3 −0 ProjectHeads/AllComponents/Wasdk/CommunityToolkit.App.Wasdk.csproj
+4 −0 ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj
+1 −1 ProjectHeads/App.Head.Uwp.props
+7 −4 ProjectHeads/App.Head.props
+0 −1 ProjectHeads/GenerateSingleSampleHeads.ps1
+1 −1 ProjectHeads/Head.WinAppSdk.props
+3 −0 ProjectHeads/SingleComponent/Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj
+3 −0 ProjectHeads/SingleComponent/Tests.Wasdk/ProjectTemplate.Tests.Wasdk.csproj
+3 −0 ProjectHeads/SingleComponent/Uwp/ProjectTemplate.Uwp.csproj
+5 −0 ProjectHeads/SingleComponent/Wasdk/ProjectTemplate.Wasdk.csproj
+4 −1 ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj
+4 −1 ProjectHeads/Tests.Head.props
+1 −1 ToolkitComponent.SourceProject.props

0 comments on commit f420b40

Please sign in to comment.