How can I connect xaml and xaml.cs files

前端 未结 11 1901
既然无缘
既然无缘 2020-12-14 05:27

I had a VB projected and converted it to C# using online conversion tools. Now the problem is xaml and xaml.cs file do not connect to each other, t

11条回答
  •  感情败类
    2020-12-14 06:20

    Using a Xamarin PCL Solution:

    1) Go to your PCL folder and open your MySolution.csproj file

    2) There should be several groups of tags. One of them declares tags and another will contain, groups of tags.

    3) For MyPage.xaml and MyPage.xaml.cs files to be linked, you must have a group of xmls that declare your xaml page.

    
          MSBuild:UpdateDesignTimeXaml
          MyPage.xaml
    
    
    
          MyPage.xaml
    
    

    Note that if your page is in a folder you should specify that like so:

    
          MyPage.xaml
    
    
    
          MSBuild:UpdateDesignTimeXaml
          MyPage.xaml
    
    

    Note that this works with OSX and Windows

提交回复
热议问题