Platform Specific controls added in Xaml are not showing when running in release mode on UWP

Hello everyone, please I have an issue, I built an app and now I want to release it to the store, but when I build the app in release mode, and I run it on UWP, the platform specific XAML controls I added in my Xamarin.Forms project are no longer visible,
please can anyone give me a hjint on how to resolve this ?

Best Answer

  • Damien_DoumerDamien_Doumer ✭✭
    edited July 2018 Accepted Answer

    Hi @robbit thanks for your reply. I found a way to bypass the issue, though I'm yet to find a straight solution for this issue.
    Here is the code for the platform specific checkbox I'm calling :

    `xmlns:win="clr-namespace:Windows.UI.Xaml.Controls;assembly=Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime;targetPlatform=Windows"

                                <win:CheckBox IsChecked="{Binding IsIncome, Mode=TwoWay}"/>
    

    `

    The way I found to walk around this issue is to create a custom rendrer on UWP for the Check box and call it your
    shared code XAML instead of calling it directly just like that.
    When you do that, the control becomes visible no matter if is in release or debug mode.

    OR Another way I made it show was to uncheck the (Compile with .net native tool chain) option and all was ok.
    though I think the best option was the first one

Answers

  • robbitrobbit CNMember Xamurai

    Hi @Damien_Doumer

    Please show your codes, so we can help you.

  • Damien_DoumerDamien_Doumer Member ✭✭
    edited July 2018 Accepted Answer

    Hi @robbit thanks for your reply. I found a way to bypass the issue, though I'm yet to find a straight solution for this issue.
    Here is the code for the platform specific checkbox I'm calling :

    `xmlns:win="clr-namespace:Windows.UI.Xaml.Controls;assembly=Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime;targetPlatform=Windows"

                                <win:CheckBox IsChecked="{Binding IsIncome, Mode=TwoWay}"/>
    

    `

    The way I found to walk around this issue is to create a custom rendrer on UWP for the Check box and call it your
    shared code XAML instead of calling it directly just like that.
    When you do that, the control becomes visible no matter if is in release or debug mode.

    OR Another way I made it show was to uncheck the (Compile with .net native tool chain) option and all was ok.
    though I think the best option was the first one

Sign In or Register to comment.