public void SetMvvmFxBindings(Control masterControl) { _bindingManager.Bindings.Clear(); if ((masterControl as Form)?.Menu != null) { ParseComponents((masterControl as Form).Menu); } foreach (Control control in masterControl.Controls) { if (control is MenuBar) { ParseComponents(control as MenuBar); } else if (control is ToolBar) { ParseComponents(control as ToolBar); } else if (control is StatusBar) { ParseComponents(control as StatusBar); } } }
/// <summary> /// Creates an instance of <see cref="ActionMessage" />. /// </summary> /// <param name="associatedObject">The associated <see cref="Control"/> object.</param> /// <param name="eventName">Name of the event on the view that triggers the ActionMessage.</param> /// <param name="methodName">Name of the method to be invoked on the presentation model class.</param> /// <param name="parameters">The parameters to pass as part of the method invocation.</param> public ActionMessage(Control associatedObject, string eventName, string methodName, IEnumerable <Parameter> parameters) { if (parameters != null) { foreach (var parameter in parameters) { parameter.MakeAwareOf(this); Parameters.Add(parameter); } } EventName = eventName; MethodName = methodName; AssociatedObject = associatedObject; }
public static void SetBindings(this Control masterControl) { if ((masterControl as Form)?.Menu != null) { ParseComponents((masterControl as Form).Menu); } foreach (Control control in masterControl.Controls) { if (control is MenuBar) { ParseComponents(control as MenuBar); } else if (control is ToolBar) { ParseComponents(control as ToolBar); } else if (control is StatusBar) { ParseComponents(control as StatusBar); } } }
/// <summary> /// Creates an instance of <see cref="ActionMessage"/>. /// </summary> /// <param name="associatedObject">The associated <see cref="Control"/> object.</param> /// <param name="eventName">Name of the event on the view that triggers the ActionMessage.</param> /// <param name="methodName">Name of the method to be invoked on the presentation model class.</param> public ActionMessage(Control associatedObject, string eventName, string methodName) { EventName = eventName; MethodName = methodName; AssociatedObject = associatedObject; }