'宣言 Public MustInherit Class ActionHandlerBase
'使用法 Dim instance As ActionHandlerBase
public abstract class 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.
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