Skip to content

Commit

Permalink
Merge pull request #561 from CommunityToolkit/wasdk/1.6
Browse files Browse the repository at this point in the history
Updated to WinAppSdk 1.6, fixed AoT annotations
  • Loading branch information
Arlodotexe authored Aug 23, 2024
2 parents 68a8339 + d346d3a commit 0d89e01
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);Uno0001</NoWarn>
<NoWarn>$(NoWarn);Uno0001</NoWarn>
</PropertyGroup>

<Import Project="Windows.Toolkit.Common.props" />
Expand Down
2 changes: 1 addition & 1 deletion components/CanvasLayout/src/CanvasLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 12 additions & 2 deletions components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion components/MarqueeText/src/MarqueeText.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public MarqueeDirection Direction
/// <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);
Expand Down
2 changes: 1 addition & 1 deletion components/RivePlayer/src/StateMachineInputCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!);

Expand Down
4 changes: 4 additions & 0 deletions components/RivePlayer/tests/ExampleRivePlayerTestClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion components/TitleBar/samples/TitleBarConfigSample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion components/TitleBar/samples/TitleBarFullSample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0d89e01

Please sign in to comment.