Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:58:35+00:00 2026-06-15T03:58:35+00:00

I have a Caliburn.Micro shell (i.e., an empty XAML view to contain other views)

  • 0

I have a Caliburn.Micro shell (i.e., an empty XAML view to contain other views) rendered by a Conductor ViewModel. From there I open a Screen via:

ActivateItem(...)

Usually from the newly displayed dialog the user can perform some operations and click buttons (OK, Cancel, Build….) which should each transition to another screen (in the shell).

public MyDialog : Screen
{
    public void Ok()
    {
        // TODO: Somehow tell the conductor or called of this class about this action.
    }
}

What are good ways to achieve these kind of dialog action/message screen transitions?

  • Simple .NET events are possible — Wouldn’t that be a bad idea?
  • CM IEventAggregator should also work by changing the view
  • Checking from the shell Conductor the ViewModel result once it has been closed via TryClose() — Should be possible, just don’t know how to achieve this in CM.
  • Reference the shell Conductor instance from that screen (via IoC or directly) — That seems strong coupling.

Could you please advise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:58:37+00:00Added an answer on June 15, 2026 at 3:58 am

    My preferred approach is to use the EventAggregator to facilitate messaging between VMs.

    This works especially well when you have multiple windows which are listening for a certain type of event (e.g. a Visual Studio style interface with multiple tool windows which may show context sensitive properties), however it sounds a little overkill for this implementation. Of course the advantages are still a good loose coupling between VMs and a lack of events (which is a good thing!)

    It sounds like you want a modal dialog to popup and present an option, and then activate another screen once the first one has returned.

    You can attach an event handler to the Deactivated event in the child VM which will fire when an item deactivates. It also passes a boolean in the arguments to notify if the item which deactivated was closed – you can check for this and activate the corresponding screen in your conductor.

    e.g.

    this.Deactivated += new EventHandler<DeactivationEventArgs>(WorkspaceViewModel_Deactivated);
    
    void WorkspaceViewModel_Deactivated(object sender, DeactivationEventArgs e)
    {
        if(e.WasClosed) // raise some event
    }
    

    Then pass an event up to the conductor, I wouldn’t really go the event route for this. This couples the VMs one-way so it may not be the most flexible solution

    The alternative is to fire a message via the event aggregator to tell the conductor it needs to open a different window when the child VM closes. The same method can be used but it’s decoupled

    this.Deactivated += new EventHandler<DeactivationEventArgs>(WorkspaceViewModel_Deactivated);
    
    void WorkspaceViewModel_Deactivated(object sender, DeactivationEventArgs e)
    {
        if(e.WasClosed) MainConductor.EventAggregator.Publish(new ActivateWindowMessage(typeof(SomeVM));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Caliburn.Micro for my Silverlight application. I have a view/viewmodel to create a
I have an MVVM-based WPF application that relies on Caliburn.Micro . In one view,
I have a WPF Caliburn.Micro application. I used to have there a DataGrid, and
I have a WPF application with Caliburn.Micro. I have a style defined in ResourceDictionary/Styles.xaml:
I have derived a custom bootstrapper from Caliburn.Micro.Bootstrapper, I notice it can take a
I am using Caliburn.Micro. In my View I have a TextBox Binded to double
I am using Caliburn.Micro I have this WPF View that in design time uses
I have an application that uses Caliburn.Micro. My View contains a user control which
I am using Caliburn Micro and have a login view model which is displayed
I am using the convention-based binding from Caliburn.Micro, but I have a small issue:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.