【发布时间】:2019-03-19 08:47:56
【问题描述】:
我的 MainWindow.xaml 文件中有以下代码:
<dxmvvm:Interaction.Behaviors>
<dx:DXSplashScreenService SplashScreenType="local:LoadingSplashScreen" ShowSplashScreenOnLoading="True"/>
</dxmvvm:Interaction.Behaviors>
我需要能够从代码隐藏 (MainWindow.xaml.cs) 动态添加此代码。这可能吗?
我需要使用Interaction.GetBehaviors(yourElementName).Add(behavior)吗??
谢谢。
【问题讨论】:
-
如果您认为该代码可以工作,为什么不尝试一下呢? stackoverflow.com/questions/10422385/…