locked
How to Embed C# Code in XAML File Windows Store apps RRS feed

  • Question

  • Hi,

    I need to embed a code in Windows Store Apps XAML file but when I tried code below (which works with WPF fine) it does not work and I got a problem <x:Code> tag is not supported.


    Please Advise,


    marawan@1234

    Thursday, January 16, 2014 7:03 PM

Answers

  • The <x:Code> pattern is not supported in WinRT-XAML. You should handle the ButtonOnClick event in code behind (C#/C++).

    Harini Kannan | Program Manager, XAML

    Thursday, January 16, 2014 7:44 PM
  • Cant put it in de xaml, only in the code behind file

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, January 16, 2014 7:45 PM

All replies

  • The <x:Code> pattern is not supported in WinRT-XAML. You should handle the ButtonOnClick event in code behind (C#/C++).

    Harini Kannan | Program Manager, XAML

    Thursday, January 16, 2014 7:44 PM
  • Cant put it in de xaml, only in the code behind file

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, January 16, 2014 7:45 PM