Skip to content

Commit

Permalink
Add suppression message for trimming warning in GetContentControl method
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed Dec 17, 2024
1 parent ddf3d56 commit 92b401d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,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>
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "This method is currently not safe for trimming, and annotations here wouldn't help.")]
public static UIElement? GetContentControl(this FrameworkElement element)
{
Type type = element.GetType();
Expand Down

0 comments on commit 92b401d

Please sign in to comment.