共用方式為


DynamicRenderer.OnDrawingAttributesReplaced 方法

定義

發生於 DrawingAttributes 屬性變更時。

protected:
 virtual void OnDrawingAttributesReplaced();
protected virtual void OnDrawingAttributesReplaced ();
abstract member OnDrawingAttributesReplaced : unit -> unit
override this.OnDrawingAttributesReplaced : unit -> unit
Protected Overridable Sub OnDrawingAttributesReplaced ()

範例

下列範例會覆寫 OnDrawingAttributesReplaced 方法。

protected override void OnDrawingAttributesReplaced()
{
    base.OnDrawingAttributesReplaced();

    MessageBox.Show(this.DrawingAttributes.Color.ToString());
}
Protected Overrides Sub OnDrawingAttributesReplaced()

    MyBase.OnDrawingAttributesReplaced()

    MessageBox.Show(Me.DrawingAttributes.Color.ToString())

End Sub

給繼承者的注意事項

OnDrawingAttributesReplaced() 衍生類別中覆寫時,請務必呼叫基類的 OnDrawingAttributesReplaced() 方法。

適用於