开发者

Method Deactivate and TryClose - Caliburn.Micro

I would be very grateful if someone explain my "differences" between method Deactivate and TryClose in MVVM framework Caliburn.Micro.

For example my app has this structure:

  • Shell (WPF window)
    • SomeScreen (User control) - is active

I know that method is Deactivate is call everytime if is screen deactivated. An method TryClose is used on attempt to close some screen.

My questions are:

  1. I click on X button on WPF window. First is call method deactivate on SomeScreen object and then is call the same method on Shell object ?

    After deactivate开发者_开发知识库 method is totally object destroyed? - "remove reference on him"?

  2. When I close WPF window which is shell it call wich methods from IConductor ?


This has been changed in a recent update to Caliburn Micro.

There's just the Deactivate method now that can optionally take a bool to say whether it is closing or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜