/// <summary> /// Initializes a new instance of the RadialMenu class. /// </summary> public RadialMenu() { _MenuContainer = new RadialMenuContainer(); _MenuContainer.RadialMenu = this; _MenuContainer.Opened += new EventHandler(RadialMenuOpened); _MenuContainer.Closed += new EventHandler(RadialMenuClosed); this.SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.ResizeRedraw | DisplayHelp.DoubleBufferFlag | ControlStyles.SupportsTransparentBackColor, true); _MenuContainer.SetOwner(this); }
/// <summary> /// Copies the RadialMenuItem specific properties to new instance of the item. /// </summary> /// <param name="copy">New ProgressBarItem instance.</param> internal void InternalCopyToItem(RadialMenuContainer copy) { CopyToItem(copy); }
/// <summary> /// Returns copy of the item. /// </summary> public override BaseItem Copy() { RadialMenuContainer copy = new RadialMenuContainer(); this.CopyToItem(copy); return copy; }
/// <summary> /// Initializes a new instance of the RadialMenuPopupProxy class. /// </summary> /// <param name="parentRadialMenu"></param> public RadialMenuPopupProxy(RadialMenuContainer parentRadialMenu) { _ParentRadialMenu = parentRadialMenu; }
/// <summary> /// Called when DisplayItem property has changed. /// </summary> /// <param name="oldValue">Old property value</param> /// <param name="newValue">New property value</param> protected virtual void OnDisplayItemChanged(RadialMenuContainer oldValue, RadialMenuContainer newValue) { if (oldValue != null) oldValue.ContainerControl = null; if (newValue != null) { newValue.ContainerControl = this; } this.Invalidate(); //OnPropertyChanged(new PropertyChangedEventArgs("DisplayItem")); }