No installed components were detected. Element is already the child of another element

北城以北 提交于 2019-12-06 00:45:34

You cannot add the element that is already child of another element. It's like your child cannot be the child of another guy man.

This exception is usually thrown if you're using more than one instance of the control you defined in your application resources. If that is the case, you should do:

<Button x:Key="MyButton" x:Shared="false"/>

EDIT: it seems WInRT doesn't support x:shared attribute.

There is a workaround using ControlTemplates: http://www.gdomc.com/0428/binding-the-content-property-of-a-contentcontrol-in-winrt/

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