/// <summary> /// Call this method to request of start editing mode for renaming this item. /// </summary> /// <param name="request"></param> /// <returns>Returns true if event was successfully send (listener is attached), otherwise false</returns> public bool RequestEditMode(RequestEditEvent request) { if (this.RequestEdit != null) { this.RequestEdit(this, new RequestEdit(request)); return(true); } return(false); }
/// <summary> /// Call this method to request of start editing mode for renaming this item. /// </summary> /// <param name="request"></param> /// <returns>Returns true if event was successfully send (listener is attached), otherwise false</returns> public bool RequestEditMode(RequestEditEvent request) { if (this.RequestEdit != null) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { this.RequestEdit(this, new RequestEdit(request)); })); return(true); } else { System.Console.WriteLine("CANNOT Request Edit Mode in ViewModel (No View Attached)."); } return(false); }
/// <summary> /// Parameterized class constructor /// </summary> /// <param name="eventRequest"></param> public RequestEdit(RequestEditEvent eventRequest) : this() { this.Request = eventRequest; }