且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

kinect应用程序 - .xaml文件出错

更新时间:2023-10-14 07:48:57

这里我假设您不知道xaml中是如何整合基本样式的。因此,首先要寻找(我的意思是在整个解决方案中搜索并确定样式的确切位置)BasicTextStyle和BasicContentStyle中的两个样式,并查看其确切位置。它应该位于其他xaml中的某个位置(这是您的ResourceDictionary)现在去了到app.xaml文件并看到它存在于ResourceDictionaries部分中。如果不存在,则在资源字典中添加此特定文件,然后再次尝试重新运行。





您也可以在其他地方执行此操作在如下所述的相同xaml上添加资源字典引用



在WPF中使用资源字典 [ ^ ]
Here I assumed that you dont know how exactly basic style is incorporated in xaml. So first of all look for(i mean search in whole solution and where exactly style is defined) two styles in BasicTextStyle and BasicContentStyle and see where exactly it is located.It should be somewhere in other xaml(which is your ResourceDictionary) and now go to app.xaml file and see that it is present in ResourceDictionaries section. If not present then add this particular file in Resource Dictionary and then try to Rerun again.


you can also do this in other by adding resource Dictionary Reference on the same xaml as described below

Using a Resource Dictionary in WPF[^]