0
当我在WPF浏览器应用程序中使用WPF用户用户控件库时遇到此问题。WPF用户控件库WPF浏览器应用程序中的XAML错误
我把它添加到页面如下,并添加了参考我的用户控件添加到项目
<Page x:Class="Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:tools="clr-namespace:Visualisation;assembly=Visualisation"
mc:Ignorable="d"
d:DesignHeight="600"
d:DesignWidth="1100"
Title="Page1">
<Grid Name="main">
<tools:uc3dview Name="_View"></tools:uc3dview>
</Grid>
</Page>
我碰到下面的错误。
System.Reflection.TargetInvocationException was unhandled
Message: Exception has been thrown by the target of an invocation.
如果我在WPF应用程序中使用这个确切的用户控件,我没有任何问题。
是否有一些构造函数符号我缺少,所以我的用户控制库可以在WPF应用程序中工作,更重要的是在WPF浏览器应用程序中工作。 我正在使用Visual Studio 2012,如果这很重要。
在此先感谢。
控制工具:uc3dview可以在部分信任下运行吗?你可以在这里阅读http://MSdn.microsoft.com/en-gb/library/aa970060.aspx – Andy 2013-02-25 06:50:16
@安迪谢谢你的提示。这是解决问题的关键。 – Scott 2013-02-26 04:15:38