请参阅棱镜手册,我制作了模态视图,并将其粘贴到主视图中,如下所示:
<baseView:BaseView ... >
<i:Interaction.Triggers>
<prism:InteractionRequestTrigger SourceObject="{Binding DocumentSelectionRequest, Mode=OneWay}">
<prism:PopupWindowAction IsModal="True">
<prism:PopupWindowAction.WindowContent>
<modal:DocumentSelectionView />
</prism:PopupWindowAction.WindowContent>
</prism:PopupWindowAction>
</prism:InteractionRequestTrigger>
</i:Interaction.Triggers>
<Grid>
...
</Grid>
</baseView:BaseView>但是,我在编译时<prism:PopupWindowAction IsModal="True">中得到了错误(在运行时一切都很完美):
错误3类型'PopupWindowAction‘的值不能添加到'TriggerActionCollection’类型的集合或字典中。
在我的项目中,我使用PRISM 5和.NET 4.5
UDP:
名称空间定义如下(在baseView:BaseView中):
xmlns:prism="http://www.codeplex.com/prism"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"参考文献:
Microsoft.Practices.Prism.Interactivity版本5.0.0.0 System.Windows.Interactivity版本4.5.0.0
发布于 2015-10-13 14:39:33
您正在使用2015吗?我在VS 2015上遇到了类似的问题,但在2013年就没有了,我首先认为来自棱镜框架的二进制文件有问题。我在棱镜GitHub上发布了一篇文章:
https://github.com/PrismLibrary/Prism/issues/213
最终对我起作用的是重新安装VS 2015。我怀疑VS 2015的一些可选扩展/插件导致了这个问题。希望这也能解决你的麻烦。
https://stackoverflow.com/questions/32696822
复制相似问题