Merge branch 'main' into uwp-net8-windows

This commit is contained in:
Arlo Godfrey 2024-08-23 15:37:45 -05:00
Родитель 09617b26b5 0d89e01c81
Коммит f05e0040c9
10 изменённых файлов: 30 добавлений и 12 удалений

Просмотреть файл

@ -32,9 +32,9 @@ git clone --recurse-submodules https://github.com/CommunityToolkit/Labs-Windows.
## Build Requirements
- Visual Studio 2022 (UWP & Desktop Workloads for .NET)
- .NET 6 SDK
- Windows App SDK
- Windows SDK 19041
- .NET 8 SDK
- Windows 10 SDK, version 2004 (10.0.19041.0)
- Windows 10 21H1 (Build 19043) or greater
- Run `dotnet tool restore` from the project root to install SlnGen
- Run build scripts from the [Developer Command Prompt for Visual Studio](https://learn.microsoft.com/visualstudio/ide/reference/command-prompt-powershell) or from elsewhere after adding `MSBuild.exe` to your PATH

Просмотреть файл

@ -4,7 +4,7 @@
namespace CommunityToolkit.Labs.WinUI;
public class CanvasLayout : MUXC.VirtualizingLayout
public partial class CanvasLayout : MUXC.VirtualizingLayout
{
#region Setup / teardown
protected override void InitializeForContextCore(MUXC.VirtualizingLayoutContext context)

Просмотреть файл

@ -51,7 +51,12 @@ internal class MyEmphasisInline : IAddChild
public void SetBold()
{
_span.FontWeight = FontWeights.Bold;
#if WINUI3
_span.FontWeight = Microsoft.UI.Text.FontWeights.Bold;
#elif WINUI2
_span.FontWeight = Windows.UI.Text.FontWeights.Bold;
#endif
_isBold = true;
}
@ -63,7 +68,12 @@ internal class MyEmphasisInline : IAddChild
public void SetStrikeThrough()
{
_span.TextDecorations = TextDecorations.Strikethrough;
#if WINUI3
_span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough;
#elif WINUI2
_span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough;
#endif
_isStrikeThrough = true;
}

Просмотреть файл

@ -4,7 +4,7 @@
namespace CommunityToolkit.Labs.WinUI.MarkdownTextBlock.TextElements;
internal class MyTableUIElement : Panel
internal partial class MyTableUIElement : Panel
{
private readonly int _columnCount;
private readonly int _rowCount;

Просмотреть файл

@ -98,7 +98,11 @@ public partial class MarqueeText
/// <summary>
/// Gets or sets a value that indicates what decorations are applied to the text.
/// </summary>
public TextDecorations TextDecorations
#if WINUI3
public Windows.UI.Text.TextDecorations TextDecorations
#elif WINUI2
public Windows.UI.Text.TextDecorations TextDecorations
#endif
{
get => (TextDecorations)GetValue(TextDecorationsProperty);
set => SetValue(TextDecorationsProperty, value);

Просмотреть файл

@ -15,7 +15,7 @@ namespace CommunityToolkit.Labs.WinUI.Rive;
/// </rive:RivePlayer>
///
/// </summary>
public class StateMachineInputCollection : DependencyObjectCollection
public partial class StateMachineInputCollection : DependencyObjectCollection
{
private WeakReference<RivePlayer> _rivePlayer = new WeakReference<RivePlayer>(null!);

Просмотреть файл

@ -8,7 +8,11 @@ using CommunityToolkit.Labs.WinUI.Rive;
namespace RivePlayerExperiment.Tests;
// Track https://github.com/CommunityToolkit/Labs-Windows/issues/567
#if !WINDOWS_WINAPPSDK
[TestClass]
#endif
public partial class ExampleRivePlayerTestClass : VisualUITestBase
{
// If you don't need access to UI objects directly or async code, use this pattern.

Просмотреть файл

@ -14,7 +14,7 @@ namespace TitleBarExperiment.Samples;
[ToolkitSampleBoolOption("ShowBackButtonSetting", false, Title = "ShowBackButton")]
[ToolkitSampleBoolOption("ShowPaneButtonSetting", false, Title = "ShowPaneButton")]
[ToolkitSample(id: nameof(TitleBarConfigSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")]
[ToolkitSample(id: nameof(TitleBarConfigSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(CommunityToolkit.WinUI.Controls.TitleBar)} in a window.")]
public sealed partial class TitleBarConfigSample : Page
{
public TitleBarConfigSample()

Просмотреть файл

@ -10,7 +10,7 @@ using Windows.UI.ViewManagement;
#endif
namespace TitleBarExperiment.Samples;
[ToolkitSample(id: nameof(TitleBarFullSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")]
[ToolkitSample(id: nameof(TitleBarFullSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(CommunityToolkit.WinUI.Controls.TitleBar)} in a window.")]
public sealed partial class TitleBarFullSample : Page
{
public TitleBarFullSample()