-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
bugIf an issue is a bug or a pull request a bug fixIf an issue is a bug or a pull request a bug fixmissing-api-bindings
Milestone
Description
Steps to Reproduce
- create a NSRulerView
- call RegisterUnit(string unitName, string abbreviation, NFloat conversionFactor, NSNumber[] stepUpCycle, NSNumber[] stepDownCycle) to create a user-defined unit
- set MeasurementUnit to unitName that registered in step2
Expected Behavior
MeasurementUnit can be set
Actual Behavior
MeasurementUnit cannot be set because the type of MeasurementUnit is enum NSRulerViewUnits not string/NSString
MeasurementUnit has type string and can work when using Xamarin.Mac
Environment
Version information
Visual Studio 2022 for Mac Preview
Version 17.6 Preview (17.6 build 402)
Runtime
.Net 7.0.1 (64-bit)
Microsoft.macOS.Sdk 13.1.1007
Comment
src: https://github.com/xamarin/xamarin-macios/blob/main/src/appkit.cs#L13420
MeasurementUnit should have type string/NSString but not an enum. This makes RegisterUnit useless as registered unit cannot be used.
Inches / in, Centimeters / cm, Points / pt, Picas / pc, are just predefined units.
https://developer.apple.com/documentation/appkit/nsrulerview/1534137-registerunit
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIf an issue is a bug or a pull request a bug fixIf an issue is a bug or a pull request a bug fixmissing-api-bindings