TextBlock.OnRender(DrawingContext) 方法

定义

呈现 TextBlock 的内容。Renders the contents of a TextBlock.

protected:
 override void OnRender(System::Windows::Media::DrawingContext ^ ctx);
protected override sealed void OnRender (System.Windows.Media.DrawingContext ctx);
override this.OnRender : System.Windows.Media.DrawingContext -> unit
Protected Overrides NotOverridable Sub OnRender (ctx As DrawingContext)

参数

ctx
DrawingContext

要在其上呈现该控件的 DrawingContextThe DrawingContext to render the control on.

异常

ctxnullctx is null.

注解

此方法由布局系统调用以呈现 TextBlock的内容。This method is invoked by the layout system to render the contents of the TextBlock.

适用于