5

I am using C#, XAML in Microsoft Visual Studio.

In WPF with the desktop version of the .Net framework, there is a markupextension class under namespace System.Windows.Markup. Saw it from the accepted answer in this post Should I declare converters in App.xaml or as a per-file resource?

Is there an equivalent or something that is close to it in for the mobile version of .Net you use to create Metro apps? I can't seem to find the appropriate namespace or is it not supported?

Community
  • 1
  • 1
learner
  • 87
  • 7
  • if you want checkboxes that are mutually exclusive, then don't use checkboxes. that's not what they're for. use radio buttons instead. – Marc B Jun 04 '13 at 21:13
  • 2
    What do you mean by "in Visual Studio". VS is only IDE, has nothing to do with .NET library. Maybe you are using wrong project type or wrong target framework. Or you are missing some references in your project. – Jurica Smircic Jun 04 '13 at 21:16
  • @MarcB,@jure Sorry, that was the wrong title. I saw a similar post that was for wpf using markupextension and ivalueconverter, I was just wondering if there is something equivalent in Visual Studio ( for Windows metro app). – learner Jun 04 '13 at 21:17
  • @learner ..ah you are talking about WinRT applications. Im afraid there is no support for creating custom markup extensions on that platform. But i may be wrong. – Jurica Smircic Jun 04 '13 at 21:24
  • @jure I checked it at http://msdn.microsoft.com/en-us/library/system.windows.markup.markupextension.aspx and it wasn't supported for the metro apps but I was just wondering if there is something equivalent or close to it that I didn't know. Anyway, thanks for the answer. – learner Jun 04 '13 at 21:28

1 Answers1

7

WinRT (Aka Metro) does not have MarkupExtension class.

Federico Berasategui
  • 43,562
  • 11
  • 100
  • 154
  • Is it worth the trouble to create a custom one? – learner Jun 04 '13 at 21:29
  • @learner I don't think you will be able to do that, at least not in a way that can then be used from XAML the same way you do it in WPF. Microsoft is screwing all this stuff up so much that we will all end up doing Objective-C in a Mac and forget MS forever. – Federico Berasategui Jun 04 '13 at 21:36
  • 1
    For any UWP developer stumbling upon this in the future, there's now some support for it, see this thread: https://stackoverflow.com/questions/47156782/how-does-one-use-the-uwp-markupextension-class – Michael Hawker - MSFT Jul 19 '18 at 04:58