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.
In UWP I want to covert Color in Xamarin to Windows.UI.Color, but I didn't find out a extension function.
I searched the source code and found that the function was in WinRT, but not UWP
Can you add them to UWP, or you forget to link the WinRT library into UWP?
The source file you linked displays an #if directive that will return the UWP namespace if it is the current platform.
Created attachment 15992 [details]
The classes in Xamarin.Forms.UWP
I didn't find the class in Xamarin.Forms.UWP 2.2
That's because the WinRT project also contains functionality in places which cover both UWP and Windows 8.1/WP8.1. That is the UWP version; when the project is compiled using conditional compilation and the #if WINDOWS_UWP line in the code you linked represents that. You can see the method used inside of our own code here: https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs#L111
You can see similar usage of this this conditional compilation in our own guides (https://developer.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/part_4_-_platform_divergence_abstraction_divergent_implementation/).
OK, I found the reason. That is the internal class.
internal static class ConvertExtensions
Can you do it as public?
second that --> for now i copy pasted the code into my solution, would be nice to not having to use duplicate code because somethings marked as internal.
> Can you do it as public?
no, or at least not now. we might consider opening this in the future though.
this definitely doesn't qualify a s a bug, I'm hence reclining this issue