Hey guys,
I am trying to setup a few detailed user controls to display information when my app runs in Debug Mode.
So what I'd like to do is to enable these User Controls only if the DEBUG Flag is enabled.
I found a discussion about this at StackOverflow, and the solution is really sweet (Link).
This is how it'll look like:
<myControls:InfoElement Requires="d" />
What you need to do is to set the namespace in your xaml and your AssembyInfo.cs.
But that's exactly what hasn't been working for me because I can't resolve the XmlnsDefinition:
#if DEBUG
[assembly: XmlnsDefinition("debug-mode", "Namespace")]
#endif
Now, I remember from the Tutorials, that Xamarin's XAML is a little different from the official MS XAML, which could be the issue.
So my question is really, if I use System.Xaml and System.Window.Markup will this work or crash my app?
Someone at Bugzilla already tried using similar elements and got a lot of exceptions, which is why I suspect that this won't work.
If so, is there any other way to accomplish what I want to do?
Thank you guys very much for your support.