Shared project with resource dictionary (xaml)

前端 未结 3 1567
长发绾君心
长发绾君心 2021-01-13 12:59

I am looking for a way to share ResourceDictionary between projects.

Adding new item to shared project doesn\'t offer resource dictionary. It can be crea

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 13:42

    I was having the same problem. There's a solution for including Xaml in shared projects which doesn't require editing the .projitems file directly.

    You just have to add Xamarin to your Visual Studio installation. (I did it with VS Community 2015.)

    You can now add xaml types via the usual Visual Studio dialog:

    And the correct build action is available:

    Xaml in shared projects now compiles and runs as expected.

    (Presumably this is there to support Xamarin Forms, but it works for any xaml document.)

提交回复
热议问题