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 for Bug 45508 on
Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
Entered the following sample code in a Workbook (Windows 10):
var rootActivity = StartedActivities.First ();
Switch mySwitch = new Switch (rootActivity);
mySwitch.ShowText = true;
When I try to run it, I get the error: "(7,10): error CS1061: 'Switch' does not contain a definition for 'ShowText' and no extension method 'ShowText' accepting a first argument of type 'Switch' could be found.
However, Switch.ShowText is supported by Xamarin.Android:
Also, I can instantiate a Switch and access its ShowText property without error in Visual Studio.
Although Xamarin docs claim that Switch.ShowText is available as early as API 14 (ICS, 4.0.3), Android's docs reveal the truth: it is not available until API 21 (Lollipop, 5.0).
Currently, the Xamarin Workbooks Android app is built using API 19 (KitKat, 4.4), and does not have access to newer APIs.
This decision was based on what device images were available for Xamarin Android Player, as well as what devices it seemed likely developers would already have installed.
Leaving this open as a feature request. Perhaps we could ship a version built against latest stable Android as well, and let the user get that if they have set up a device for it. Every app we add to Workbooks adds a big hit to install size though.