Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to WinAppSdk 1.6, fixed AoT annotations #561

Merged
merged 22 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0c560df
Fix ambiguous references to TitleBar
Arlodotexe Aug 7, 2024
729f407
Cleanup for ambiguous reference fix
Arlodotexe Aug 7, 2024
ce970ba
Fixed CsWinRT1028
Arlodotexe Aug 7, 2024
411ab59
Update WinAppSDK to 1.6.240701003-experimental2
Arlodotexe Aug 7, 2024
622a1a8
Fix ambiugous reference
Arlodotexe Aug 8, 2024
da4c61e
Fully qualify Microsoft.UI.Text.FontWeights
Arlodotexe Aug 8, 2024
c70f95d
Update tooling
Arlodotexe Aug 9, 2024
a51b16d
Update tooling
Arlodotexe Aug 9, 2024
e889572
Add CsWinRT1028 suppression
Arlodotexe Aug 13, 2024
27e81e4
Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1, remove CsWi…
Arlodotexe Aug 14, 2024
2fe3801
Fixed CsWinRT1028 errors
Arlodotexe Aug 14, 2024
ecaa8dc
Update WindowsSdkPackageVersion for Wasdk 1.6 preview1
Arlodotexe Aug 14, 2024
8452130
Update transient WebView2 reference to 1.0.2730-prerelease
Arlodotexe Aug 14, 2024
cb8bbaa
Fully qualify TextDecorations on WinUI 3
Arlodotexe Aug 14, 2024
e925ed1
Revert WindowsSdkPackageVersion to 10.0.22621.37-preview for WindowsA…
Arlodotexe Aug 15, 2024
25aded9
Update tooling with latest CsWinRT1028 fixes
Arlodotexe Aug 16, 2024
7955365
Update tooling pointer
Arlodotexe Aug 16, 2024
2d37d77
Update tooling pointer
Arlodotexe Aug 16, 2024
d0ac9b4
Remove clean task to resolve https://github.com/CommunityToolkit/Wind…
Arlodotexe Aug 19, 2024
4d4d676
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 22, 2024
88dabef
Disabled RivePlayer tests on WindowsAppSDK.
Arlodotexe Aug 23, 2024
d346d3a
Update tooling to latest main
Arlodotexe Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);Uno0001</NoWarn>
<!--
Suppress 'error CsWinRT1028: Class implements WinRT interfaces but isn't marked partial. ' for generated XamlMetaDataProvider.g.cs.
Fix is expected to arrive in prerelease1 of Microsoft.WindowsAppSdk 1.6.
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
Internal tracking: https://microsoft.visualstudio.com/OS/_workitems/edit/52541822/

Notice: This suppression affects CsWinRT1028 for all generated and non-generated code.
Disable to check non-generated code for CsWinRT1028.
-->
<NoWarn>$(NoWarn);CsWinRT1028;</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
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()
{
#if WINUI3
_span.TextDecorations = TextDecorations.Strikethrough;
#elif WINUI2
_span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough;
#endif

_isStrikeThrough = true;
}

Expand Down
4 changes: 4 additions & 0 deletions 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>
#if WINUI3
public 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
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
Loading