protected virtual void OnWatermarkChanged(ExpandoEventArgs e) { if (WatermarkChanged != null) { WatermarkChanged(this, e); } }
protected virtual void OnStateChanged(ExpandoEventArgs e) { if (StateChanged != null) { StateChanged(this, e); } }
protected virtual void OnTitleImageChanged(ExpandoEventArgs e) { if (TitleImageChanged != null) { TitleImageChanged(this, e); } }
protected virtual void OnSpecialGroupChanged(ExpandoEventArgs e) { if (SpecialGroupChanged != null) { SpecialGroupChanged(this, e); } }
/// <summary> /// Event handler for the Expando StateChanged event /// </summary> /// <param name="sender">The object that fired the event</param> /// <param name="e">An ExpandoEventArgs that contains the event data</param> private void expando_StateChanged(object sender, ExpandoEventArgs e) { this.OnExpandoStateChanged(e); }
/// <summary> /// Occurs when the value of an Expandos Collapsed property changes /// </summary> /// <param name="e">An ExpandoEventArgs that contains the event data</param> protected virtual void OnExpandoStateChanged(ExpandoEventArgs e) { this.DoLayout(true); }
/// <summary> /// Raises the ExpandoRemoved event /// </summary> /// <param name="e">An ExpandoEventArgs that contains the event data</param> protected virtual void OnExpandoRemoved(ExpandoEventArgs e) { // remove the control from the ControlCollection if it hasn't already if (this.Controls.Contains(e.Expando)) { this.Controls.Remove(e.Expando); } // remove the StateChanged listener e.Expando.StateChanged -= new ExpandoEventHandler(this.expando_StateChanged); // update the layout of the controls this.DoLayout(); // if (ExpandoRemoved != null) { ExpandoRemoved(this, e); } }
/// <summary> /// Raises the ExpandoAdded event /// </summary> /// <param name="e">An ExpandoEventArgs that contains the event data</param> protected virtual void OnExpandoAdded(ExpandoEventArgs e) { // add the expando to the ControlCollection if it hasn't already if (!this.Controls.Contains(e.Expando)) { this.Controls.Add(e.Expando); } // set anchor styles e.Expando.Anchor = (AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right); // tell the Expando who's its daddy... e.Expando.TaskPane = this; e.Expando.SystemSettings = this.systemSettings; // listen for collapse/expand events e.Expando.StateChanged += new ExpandoEventHandler(this.expando_StateChanged); // update the layout of the controls this.DoLayout(); // if (ExpandoAdded != null) { ExpandoAdded(this, e); } }