/// <summary> /// Initialize a new instance of the PaletteTrackBarPositionStates class. /// </summary> /// <param name="inheritPosition">Source for inheriting position values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteTrackBarPositionStates(IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritPosition != null); // Store the provided paint notification delegate NeedPaint = needPaint; // Create storage that maps onto the inherit instances Position = new PaletteElementColor(inheritPosition, needPaint); }
/// <summary> /// Initialize a new instance of the PaletteTrackBarPositionStates class. /// </summary> /// <param name="inheritPosition">Source for inheriting position values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteTrackBarPositionStates(IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritPosition != null); // Store the provided paint notification delegate NeedPaint = needPaint; // Create storage that maps onto the inherit instances _positionState = new PaletteElementColor(inheritPosition, needPaint); }