none
[UWP]Regarding C++ support for C# UWP controls

Answers

  • Hi PriyangaBalu,

    >>”Is any possibility to use C# UniversalWindowsPlatform controls in C++ UniversalWindowsPlatform application?”

    Sorry for my late reply.

    Based on your description, I have created a simple project to test. The answer is yes, you could get your target. Please refer to my following steps:

    Step 1: Create a windows runtime component

    Step 2: Create a C++ Universal Windows App project

    Step 3: Add reference

    Then you could get your C# usercontrol in your C++ project.

    The following is XAML code of MainPage in C++ project.

    <Page
        x:Class="App1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App1"
        xmlns:mycontrol="using:myControl"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
    
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <mycontrol:MyUserControl1></mycontrol:MyUserControl1>
        </Grid>
    </Page>

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 27, 2016 5:51 AM
    Moderator

All replies

  • Hi Priyanga B,

    Your case more related to UWP, I help you move this case to UWP forum for better support.

    Have a nice day!

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 21, 2016 6:03 AM
  • Hi Kristin,

    Thanks for your reply and help. I am waiting for the answer from concern team.

    Regards,

    Priyanga B 

    Thursday, January 21, 2016 7:18 AM
  • Hi PriyangaBalu,

    >>”Is any possibility to use C# UniversalWindowsPlatform controls in C++ UniversalWindowsPlatform application?”

    Sorry for my late reply.

    Based on your description, I have created a simple project to test. The answer is yes, you could get your target. Please refer to my following steps:

    Step 1: Create a windows runtime component

    Step 2: Create a C++ Universal Windows App project

    Step 3: Add reference

    Then you could get your C# usercontrol in your C++ project.

    The following is XAML code of MainPage in C++ project.

    <Page
        x:Class="App1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App1"
        xmlns:mycontrol="using:myControl"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
    
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <mycontrol:MyUserControl1></mycontrol:MyUserControl1>
        </Grid>
    </Page>

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 27, 2016 5:51 AM
    Moderator