WPF应用Loaded事件单次加载

示例代码:

RoutedEventHandler eventHander = null;
eventHander = (s, e) =>
{
    //添加你的代码

    Owner.Loaded -= eventHander;
};
Owner.Loaded += eventHander;

 

posted @ 2021-02-25 14:47  wzwyc  阅读(698)  评论(0编辑  收藏  举报