PrintDocument for WinForms
ActionHandlerBase クラス
メンバ  使用例 


C1.PrintDocument.6 アセンブリ > C1.C1Preview 名前空間 : ActionHandlerBase クラス
The abstract base class for types representing various document-related actions that can be performed in response to a user action on a control produced by a RenderInputBase object.
オブジェクト モデル
ActionHandlerBase クラス
シンタックス
'宣言
 
Public MustInherit Class ActionHandlerBase 
'使用法
 
Dim instance As ActionHandlerBase
public abstract class ActionHandlerBase 
解説

When a C1PrintDocument containing one or more RenderInputBase-derived objects is shown by a supporting viewer control such as C1PrintPreviewControl, each RenderInputBase object produces a corresponding control on the document page. E.g. a RenderInputText produces a textbox control where the user can enter text, a RenderInputButton produces a pushbutton, and so on.

The functionality of those input controls in the document can be expanded via "action handlers", which are similar to C# or VB event handlers that can be assigned to events on many .NET components. The list of supported events is specified by the UserActionEnum enumeration, and includes mouse click, mouse enter and leave, keyboard focus enter and leave, and mouse up and down events.

To create and attach a handler to a user action on a RenderInputBase-derived object, follow these general steps:

Note that several InputAction objects can be associated with a single render input control.

使用例
The following example shows how to add a button that would jump to the last page of the current document when clicked, to a document:
C1PrintDocument doc = new C1PrintDocument();
// Create an action handler that would jump to the last page:
ActionHandlerLink ahl = new ActionHandlerLink(new C1LinkTargetPage(PageJumpTypeEnum.Last));
// Create an input action, set its properties:
InputAction ia = new InputAction();
ia.ActionHandler = ahl;
ia.UserAction = UserActionEnum.Click;
// Create a button, add the input action to its actions:
RenderInputButton rbtn = new RenderInputButton("Jump to last page");
rbtn.InputActions.Add(ia);
// Add the button to the document:
doc.Body.Children.Add(rbtn);
// ...add more content to the document...
継承階層

System.Object
   C1.C1Preview.ActionHandlerBase
      C1.C1Preview.ActionHandlerFile
      C1.C1Preview.ActionHandlerHistoryNext
      C1.C1Preview.ActionHandlerHistoryPrev
      C1.C1Preview.ActionHandlerLink
      C1.C1Preview.ActionHandlerPageSetup
      C1.C1Preview.ActionHandlerPageView
      C1.C1Preview.ActionHandlerPrint
      C1.C1Preview.ActionHandlerReflow

参照

ActionHandlerBase メンバ
C1.C1Preview 名前空間