首页 > 其他分享 >wpf Load

wpf Load

时间:2022-09-01 18:14:14浏览次数:66  
标签:Load Interaction Triggers IsBusy wpf 写法

第一种写法,写在Interaction.Triggers

<UserControl>

 <b:Interaction.Triggers>
        <b:EventTrigger EventName="Loaded">
            <b:CallMethodAction TargetObject="{Binding}"
                                MethodName="Load" />
        </b:EventTrigger>
    </b:Interaction.Triggers>

</UserControl>

 

第二种写法,直接写在UserControl的Loaded事件中

<UserControl x:Class="ChuckReviewView"
             xmlns:viewmodels="Chuck.ViewModels"
             d:DataContext="{d:DesignInstance Type=viewmodels:ChuckReviewViewModel}"
             mc:Ignorable="d"
             Loaded="{DXEvent Handler='Load()', CatchExceptions=False}">
</UserControl>

 

 

 

IsBusy的加载圈

<dx:LoadingDecorator IsSplashScreenShown="{Binding IsBusy}">

 

标签:Load,Interaction,Triggers,IsBusy,wpf,写法
From: https://www.cnblogs.com/chucklu/p/16647398.html

相关文章