Skip to content

Commit 0d89e01

Browse files
authored
Merge pull request #561 from CommunityToolkit/wasdk/1.6
Updated to WinAppSdk 1.6, fixed AoT annotations
2 parents 68a8339 + d346d3a commit 0d89e01

File tree

10 files changed

+28
-10
lines changed

10 files changed

+28
-10
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
1313
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1414
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
15-
<NoWarn>$(NoWarn);Uno0001</NoWarn>
15+
<NoWarn>$(NoWarn);Uno0001</NoWarn>
1616
</PropertyGroup>
1717

1818
<Import Project="Windows.Toolkit.Common.props" />

components/CanvasLayout/src/CanvasLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace CommunityToolkit.Labs.WinUI;
66

7-
public class CanvasLayout : MUXC.VirtualizingLayout
7+
public partial class CanvasLayout : MUXC.VirtualizingLayout
88
{
99
#region Setup / teardown
1010
protected override void InitializeForContextCore(MUXC.VirtualizingLayoutContext context)

components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ public void AddChild(IAddChild child)
5151

5252
public void SetBold()
5353
{
54-
_span.FontWeight = FontWeights.Bold;
54+
#if WINUI3
55+
_span.FontWeight = Microsoft.UI.Text.FontWeights.Bold;
56+
#elif WINUI2
57+
_span.FontWeight = Windows.UI.Text.FontWeights.Bold;
58+
#endif
59+
5560
_isBold = true;
5661
}
5762

@@ -63,7 +68,12 @@ public void SetItalic()
6368

6469
public void SetStrikeThrough()
6570
{
66-
_span.TextDecorations = TextDecorations.Strikethrough;
71+
#if WINUI3
72+
_span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough;
73+
#elif WINUI2
74+
_span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough;
75+
#endif
76+
6777
_isStrikeThrough = true;
6878
}
6979

components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace CommunityToolkit.Labs.WinUI.MarkdownTextBlock.TextElements;
66

7-
internal class MyTableUIElement : Panel
7+
internal partial class MyTableUIElement : Panel
88
{
99
private readonly int _columnCount;
1010
private readonly int _rowCount;

components/MarqueeText/src/MarqueeText.Properties.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ public MarqueeDirection Direction
9898
/// <summary>
9999
/// Gets or sets a value that indicates what decorations are applied to the text.
100100
/// </summary>
101-
public TextDecorations TextDecorations
101+
#if WINUI3
102+
public Windows.UI.Text.TextDecorations TextDecorations
103+
#elif WINUI2
104+
public Windows.UI.Text.TextDecorations TextDecorations
105+
#endif
102106
{
103107
get => (TextDecorations)GetValue(TextDecorationsProperty);
104108
set => SetValue(TextDecorationsProperty, value);

components/RivePlayer/src/StateMachineInputCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace CommunityToolkit.Labs.WinUI.Rive;
1515
/// </rive:RivePlayer>
1616
///
1717
/// </summary>
18-
public class StateMachineInputCollection : DependencyObjectCollection
18+
public partial class StateMachineInputCollection : DependencyObjectCollection
1919
{
2020
private WeakReference<RivePlayer> _rivePlayer = new WeakReference<RivePlayer>(null!);
2121

components/RivePlayer/tests/ExampleRivePlayerTestClass.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
namespace RivePlayerExperiment.Tests;
1010

11+
// Track https://github.com/CommunityToolkit/Labs-Windows/issues/567
12+
#if !WINDOWS_WINAPPSDK
1113
[TestClass]
14+
#endif
15+
1216
public partial class ExampleRivePlayerTestClass : VisualUITestBase
1317
{
1418
// If you don't need access to UI objects directly or async code, use this pattern.

components/TitleBar/samples/TitleBarConfigSample.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace TitleBarExperiment.Samples;
1414
[ToolkitSampleBoolOption("ShowBackButtonSetting", false, Title = "ShowBackButton")]
1515
[ToolkitSampleBoolOption("ShowPaneButtonSetting", false, Title = "ShowPaneButton")]
1616

17-
[ToolkitSample(id: nameof(TitleBarConfigSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")]
17+
[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.")]
1818
public sealed partial class TitleBarConfigSample : Page
1919
{
2020
public TitleBarConfigSample()

components/TitleBar/samples/TitleBarFullSample.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#endif
1111
namespace TitleBarExperiment.Samples;
1212

13-
[ToolkitSample(id: nameof(TitleBarFullSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")]
13+
[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.")]
1414
public sealed partial class TitleBarFullSample : Page
1515
{
1616
public TitleBarFullSample()

0 commit comments

Comments
 (0)