Skip to content

Commit

Permalink
[AppKit] Fix wrong binding for NSToolbarItem.Image in Mac Catalyst. F…
Browse files Browse the repository at this point in the history
…ixes #15068.

Fixes #15068.
  • Loading branch information
rolfbjarne committed May 19, 2022
1 parent 1477c9b commit e37ae30
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20246,7 +20246,24 @@ interface NSToolbarItem : NSCopying, NSMenuItemValidation, NSValidatedUserInterf
bool Enabled { [Bind ("isEnabled")]get; set; }

[Export ("image", ArgumentSemantic.Retain), NullAllowed]
#if XAMCORE_5_0 && __MACCATALYST__
UIImage Image { get; set; }
#else
NSImage Image { get; set; }
#endif

// We incorrectly bound 'Image' as NSImage in Mac Catalyst.
// Provide this alternative until we can make 'Image' correct in XAMCORE_5_0
// Obsolete this member in XAMCORE_5_0
// and remove it in XAMCORE_6_0
#if __MACCATALYST__ && !XAMCORE_6_0
#if XAMCORE_5_0
[Obsolete ("Use 'Image' instead.")]
#endif
[Sealed]
[Export ("image", ArgumentSemantic.Retain), NullAllowed]
UIImage UIImage { get; set; }
#endif

[NoMacCatalyst]
[Export ("view", ArgumentSemantic.Retain)]
Expand Down

0 comments on commit e37ae30

Please sign in to comment.