Skip to content

Commit

Permalink
Fix AoT errors in FrameworkElementExtensions, update submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed Dec 16, 2024
1 parent f3033b2 commit d5fa8ba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Reflection;
using CommunityToolkit.WinUI.Predicates;
using System.Diagnostics.CodeAnalysis;

#nullable enable

Expand Down Expand Up @@ -95,7 +96,7 @@ public static partial class FrameworkElementExtensions
/// <param name="element">The root element.</param>
/// <param name="predicate">The predicatee to use to match the child nodes.</param>
/// <returns>The child that was found, or <see langword="null"/>.</returns>
private static T? FindChild<T, TPredicate>(this FrameworkElement element, ref TPredicate predicate)
private static T? FindChild<T, TPredicate>([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element, ref TPredicate predicate)
where T : notnull, FrameworkElement
where TPredicate : struct, IPredicate<T>
{
Expand Down Expand Up @@ -662,7 +663,7 @@ public static IEnumerable<FrameworkElement> FindParents(this FrameworkElement el
/// </summary>
/// <param name="element">The parent element.</param>
/// <returns>The retrieved content control, or <see langword="null"/> if not available.</returns>
public static UIElement? GetContentControl(this FrameworkElement element)
public static UIElement? GetContentControl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element)
{
Type type = element.GetType();
TypeInfo? typeInfo = type.GetTypeInfo();
Expand Down

0 comments on commit d5fa8ba

Please sign in to comment.