diff --git a/Directory.Build.props b/Directory.Build.props index 766daa63d..74436b013 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ true true - $(NoWarn);Uno0001 + $(NoWarn);Uno0001 diff --git a/components/CanvasLayout/src/CanvasLayout.cs b/components/CanvasLayout/src/CanvasLayout.cs index ea8b85138..a6ac2264a 100644 --- a/components/CanvasLayout/src/CanvasLayout.cs +++ b/components/CanvasLayout/src/CanvasLayout.cs @@ -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) diff --git a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs index ef30998f4..eef14b962 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs @@ -51,7 +51,12 @@ public void AddChild(IAddChild child) 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 @@ public void SetItalic() 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; } diff --git a/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs b/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs index dfe6883d0..8188d9611 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs @@ -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; diff --git a/components/MarqueeText/src/MarqueeText.Properties.cs b/components/MarqueeText/src/MarqueeText.Properties.cs index c7f207255..b331e6094 100644 --- a/components/MarqueeText/src/MarqueeText.Properties.cs +++ b/components/MarqueeText/src/MarqueeText.Properties.cs @@ -98,7 +98,11 @@ public MarqueeDirection Direction /// /// Gets or sets a value that indicates what decorations are applied to the text. /// - 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); diff --git a/components/RivePlayer/src/StateMachineInputCollection.cs b/components/RivePlayer/src/StateMachineInputCollection.cs index 5b5091159..bbd93c229 100644 --- a/components/RivePlayer/src/StateMachineInputCollection.cs +++ b/components/RivePlayer/src/StateMachineInputCollection.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.Labs.WinUI.Rive; /// /// /// -public class StateMachineInputCollection : DependencyObjectCollection +public partial class StateMachineInputCollection : DependencyObjectCollection { private WeakReference _rivePlayer = new WeakReference(null!); diff --git a/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs b/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs index 7f5ea8949..25cd42401 100644 --- a/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs +++ b/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs @@ -8,7 +8,11 @@ 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. diff --git a/components/TitleBar/samples/TitleBarConfigSample.xaml.cs b/components/TitleBar/samples/TitleBarConfigSample.xaml.cs index 645efe4eb..4269270c1 100644 --- a/components/TitleBar/samples/TitleBarConfigSample.xaml.cs +++ b/components/TitleBar/samples/TitleBarConfigSample.xaml.cs @@ -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() diff --git a/components/TitleBar/samples/TitleBarFullSample.xaml.cs b/components/TitleBar/samples/TitleBarFullSample.xaml.cs index 8bede4933..546d4ec0a 100644 --- a/components/TitleBar/samples/TitleBarFullSample.xaml.cs +++ b/components/TitleBar/samples/TitleBarFullSample.xaml.cs @@ -10,7 +10,7 @@ #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() diff --git a/tooling b/tooling index 028fe9c50..df780af45 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 028fe9c50bd98d926bbed5d612668d753aa09b24 +Subproject commit df780af45016b43606f04d202255e37033402af5