Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When calling AppearanceWhenContainedIn, a NullReferenceException occurs:
Message: Object reference not set to an instance of an object
StackTrace: at MonoTouch.UIKit.UIAppearance.GetAppearance (IntPtr class_ptr, System.Type whenFoundIn) [0x00068] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIAppearance.cs:59
at MonoTouch.UIKit.UISlider.AppearanceWhenContainedIn (System.Type containers) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UISlider.g.cs:644
Steps to reproduce:
1. Create a new Empty iPhone project.
2. Add an iPhone view with controller (I have named it MainController).
3. Open XIB in Xcode and add a UISlider.
4. Connect the UISlider with an outlet.
5. Enter the following code, either in FinishedLaunching or in ViewDidLoad of MainController:
UISlider.UISliderAppearance style = UISlider.AppearanceWhenContainedIn(typeof(MainController)); // throws exception
Also tested the same with a UIButton. Again, an exception is thrown.
Fixed in git, should be included in 5.0.3(?)