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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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