Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am designing an WPF app shell using MEF. I would like to have the app start a "view" upon startup. I also would like the option of having another add-in have a "startup" attribute and then the app would load that one instead. I've made an interface:

public interface IStartupParams
    /// <summary>Gets or sets the WindowMode property.</summary>
    WindowMode WindowMode { get; set; }

    /// <summary>Gets or sets the NavigateUri property.</summary>
    string NavigateUri { get; set; }

    /// <summary>Gets or sets the Priority property.</summary>
    int Priority { get; set; }

So the app would load multiple IStartupParams concrete classes and select the one with the highest priority.

What do you guys thing about this design? Any ideas?

share|improve this question

Since you like the startup of items of your app to be configured, I would most certainly push out these configuration items into an external source (appsettings). That way you are able to restore original startup without having to hardcode anything and it will also be easy to accomodate the extensibility and priorities you're describing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.