diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index 5a01d596c4..3d993426af 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -1283,6 +1283,7 @@ namespace AppKit { AsKeyedArchive = 4 } +#if !XAMCORE_4_0 && MONOMAC // Use the one in Foundation instead, only keep this in macOS until XAMCORE_4_0. [Native] public enum NSUnderlineStyle : long { None = 0x00, @@ -1296,6 +1297,7 @@ namespace AppKit { PatternDashDotDot = 0x0400, ByWord = 0x8000 } +#endif // Convenience enum, untyped in ObjC public enum NSUnderlinePattern : int { diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 41f533168f..3a6ff5427a 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -837,9 +837,9 @@ namespace Foundation { LongestEffectiveRangeNotRequired = 1 << 20 } -#if !MONOMAC - // MonoMac AppKit redefines this - // NSInteger -> NSAttributedString.h +#if XAMCORE_4_0 || !MONOMAC + // macOS has defined this in AppKit as well, but starting with XAMCORE_4_0 we're going + // to use this one only. [Native] public enum NSUnderlineStyle : long { None = 0x00,