Uwp: Xaml Parse Error with Target Device Family Desktop and Custom Styles

老子叫甜甜 提交于 2020-01-04 03:17:08

问题


:)

I encountered a very weird error. I just completed work on my new UWP app. In my app I use custom styles for textBoxes and buttons (I created them by editing a template copy in Blend).

The app is for desktop use only, and I remembered that I have to declare that in my manifest. So I changed the Target Device Family to

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0"/>  
  </Dependencies>

But then I get a Windows.UI.Xaml.Markup.XamlParseException on the custom style parts in my app. The app works perfectly fine when I delete these custom styles. And when I leave the target device family as it was before, Windows.Universal, everything also works fine with all the custom styles.

Do I miss something or is this just a bug?

Best wishes! :)

来源:https://stackoverflow.com/questions/39714668/uwp-xaml-parse-error-with-target-device-family-desktop-and-custom-styles

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!