locked
Shared Project missing UserControl (WPF) new item template. RRS feed

  • Question

  • I have a shared project in VS 2015 and when I go to add a new item I can't add a UserControl (WPF) via the Add New Item window. I am on Window 8 enterprise running vs 2015 am I missing an extension or something? Any help would be appreciated.
    Monday, December 7, 2015 4:46 PM

Answers

  • You cannot share XAML markup between the different platforms. WPF uses a specific "dialect" of XAML and WinRT another one. So you need to keep your WPF user controls separated from your WinRT ones.

    If you create a new "WPF User Control Library" project, you will be able to add WPF user controls to it as usual. But I am afraid you won't be able to use these user controls in your Windows Store App and vice versa.


    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    • Edited by Magnus (MM8)MVP Monday, December 7, 2015 4:59 PM
    • Proposed as answer by Kristin Xie Tuesday, December 8, 2015 6:28 AM
    • Marked as answer by Kristin Xie Tuesday, December 15, 2015 1:28 AM
    Monday, December 7, 2015 4:52 PM