public CustomServiceWithKeyUserControl() { InitializeComponent(); #region SetUp MVVMContext mvvmContext = new MVVMContext(); mvvmContext.ContainerControl = this; SimpleButton commandButton = new SimpleButton(); commandButton.Text = "Execute Command"; commandButton.Dock = DockStyle.Top; commandButton.Parent = this; #endregion SetUp #region #customServiceWithKey mvvmContext.ViewModelType = typeof(ViewModelWithKeyedCustomService); // Custom service registration mvvmContext.RegisterService("SomeKey1", new CustomService("Custom Service 1")); mvvmContext.RegisterService("SomeKey2", new CustomService("Custom Service 2")); // UI binding for button mvvmContext.BindCommand <ViewModelWithKeyedCustomService>(commandButton, x => x.DoSomethingViaCustomServices()); #endregion #customServiceWithKey }