Merge branch 'main' into uwp-net8-windows
This commit is contained in:
Коммит
f05e0040c9
|
@ -12,7 +12,7 @@
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<NoWarn>$(NoWarn);Uno0001</NoWarn>
|
<NoWarn>$(NoWarn);Uno0001</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="Windows.Toolkit.Common.props" />
|
<Import Project="Windows.Toolkit.Common.props" />
|
||||||
|
|
|
@ -32,9 +32,9 @@ git clone --recurse-submodules https://github.com/CommunityToolkit/Labs-Windows.
|
||||||
## Build Requirements
|
## Build Requirements
|
||||||
|
|
||||||
- Visual Studio 2022 (UWP & Desktop Workloads for .NET)
|
- Visual Studio 2022 (UWP & Desktop Workloads for .NET)
|
||||||
- .NET 6 SDK
|
- .NET 8 SDK
|
||||||
- Windows App SDK
|
- Windows 10 SDK, version 2004 (10.0.19041.0)
|
||||||
- Windows SDK 19041
|
- Windows 10 21H1 (Build 19043) or greater
|
||||||
- Run `dotnet tool restore` from the project root to install SlnGen
|
- 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
|
- 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;
|
namespace CommunityToolkit.Labs.WinUI;
|
||||||
|
|
||||||
public class CanvasLayout : MUXC.VirtualizingLayout
|
public partial class CanvasLayout : MUXC.VirtualizingLayout
|
||||||
{
|
{
|
||||||
#region Setup / teardown
|
#region Setup / teardown
|
||||||
protected override void InitializeForContextCore(MUXC.VirtualizingLayoutContext context)
|
protected override void InitializeForContextCore(MUXC.VirtualizingLayoutContext context)
|
||||||
|
|
|
@ -51,7 +51,12 @@ internal class MyEmphasisInline : IAddChild
|
||||||
|
|
||||||
public void SetBold()
|
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;
|
_isBold = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +68,12 @@ internal class MyEmphasisInline : IAddChild
|
||||||
|
|
||||||
public void SetStrikeThrough()
|
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;
|
_isStrikeThrough = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace CommunityToolkit.Labs.WinUI.MarkdownTextBlock.TextElements;
|
namespace CommunityToolkit.Labs.WinUI.MarkdownTextBlock.TextElements;
|
||||||
|
|
||||||
internal class MyTableUIElement : Panel
|
internal partial class MyTableUIElement : Panel
|
||||||
{
|
{
|
||||||
private readonly int _columnCount;
|
private readonly int _columnCount;
|
||||||
private readonly int _rowCount;
|
private readonly int _rowCount;
|
||||||
|
|
|
@ -98,7 +98,11 @@ public partial class MarqueeText
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value that indicates what decorations are applied to the text.
|
/// Gets or sets a value that indicates what decorations are applied to the text.
|
||||||
/// </summary>
|
/// </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);
|
get => (TextDecorations)GetValue(TextDecorationsProperty);
|
||||||
set => SetValue(TextDecorationsProperty, value);
|
set => SetValue(TextDecorationsProperty, value);
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace CommunityToolkit.Labs.WinUI.Rive;
|
||||||
/// </rive:RivePlayer>
|
/// </rive:RivePlayer>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class StateMachineInputCollection : DependencyObjectCollection
|
public partial class StateMachineInputCollection : DependencyObjectCollection
|
||||||
{
|
{
|
||||||
private WeakReference<RivePlayer> _rivePlayer = new WeakReference<RivePlayer>(null!);
|
private WeakReference<RivePlayer> _rivePlayer = new WeakReference<RivePlayer>(null!);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,11 @@ using CommunityToolkit.Labs.WinUI.Rive;
|
||||||
|
|
||||||
namespace RivePlayerExperiment.Tests;
|
namespace RivePlayerExperiment.Tests;
|
||||||
|
|
||||||
|
// Track https://github.com/CommunityToolkit/Labs-Windows/issues/567
|
||||||
|
#if !WINDOWS_WINAPPSDK
|
||||||
[TestClass]
|
[TestClass]
|
||||||
|
#endif
|
||||||
|
|
||||||
public partial class ExampleRivePlayerTestClass : VisualUITestBase
|
public partial class ExampleRivePlayerTestClass : VisualUITestBase
|
||||||
{
|
{
|
||||||
// If you don't need access to UI objects directly or async code, use this pattern.
|
// 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("ShowBackButtonSetting", false, Title = "ShowBackButton")]
|
||||||
[ToolkitSampleBoolOption("ShowPaneButtonSetting", false, Title = "ShowPaneButton")]
|
[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 sealed partial class TitleBarConfigSample : Page
|
||||||
{
|
{
|
||||||
public TitleBarConfigSample()
|
public TitleBarConfigSample()
|
||||||
|
|
|
@ -10,7 +10,7 @@ using Windows.UI.ViewManagement;
|
||||||
#endif
|
#endif
|
||||||
namespace TitleBarExperiment.Samples;
|
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 sealed partial class TitleBarFullSample : Page
|
||||||
{
|
{
|
||||||
public TitleBarFullSample()
|
public TitleBarFullSample()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче