| PdfToolBarCreateToggleButton Method |
Create a new instance of ToggleButon class with the specified name that displays the specified text and image and that raises the Click event.
Namespace: Patagames.Pdf.Net.Controls.Wpf.ToolBarsAssembly: Patagames.Pdf.Wpf (in Patagames.Pdf.Wpf.dll) Version: 4.94.2704
Syntax protected virtual ToggleButton CreateToggleButton(
string name,
string text,
string toolTipText,
string imgResName,
RoutedEventHandler onClick,
int imgWidth = 32,
int imgHeight = 32,
PdfToolBarImageTextType imageTextType = PdfToolBarImageTextType.ImageBeforeText
)
Protected Overridable Function CreateToggleButton (
name As String,
text As String,
toolTipText As String,
imgResName As String,
onClick As RoutedEventHandler,
Optional imgWidth As Integer = 32,
Optional imgHeight As Integer = 32,
Optional imageTextType As PdfToolBarImageTextType = PdfToolBarImageTextType.ImageBeforeText
) As ToggleButton
protected:
virtual ToggleButton^ CreateToggleButton(
String^ name,
String^ text,
String^ toolTipText,
String^ imgResName,
RoutedEventHandler^ onClick,
int imgWidth = 32,
int imgHeight = 32,
PdfToolBarImageTextType imageTextType = PdfToolBarImageTextType::ImageBeforeText
)
abstract CreateToggleButton :
name : string *
text : string *
toolTipText : string *
imgResName : string *
onClick : RoutedEventHandler *
?imgWidth : int *
?imgHeight : int *
?imageTextType : PdfToolBarImageTextType
(* Defaults:
let _imgWidth = defaultArg imgWidth 32
let _imgHeight = defaultArg imgHeight 32
let _imageTextType = defaultArg imageTextType PdfToolBarImageTextType.ImageBeforeText
*)
-> ToggleButton
override CreateToggleButton :
name : string *
text : string *
toolTipText : string *
imgResName : string *
onClick : RoutedEventHandler *
?imgWidth : int *
?imgHeight : int *
?imageTextType : PdfToolBarImageTextType
(* Defaults:
let _imgWidth = defaultArg imgWidth 32
let _imgHeight = defaultArg imgHeight 32
let _imageTextType = defaultArg imageTextType PdfToolBarImageTextType.ImageBeforeText
*)
-> ToggleButton
protected ToggleButton CreateToggleButton(
String name,
String text,
String toolTipText,
String imgResName,
RoutedEventHandler onClick,
int imgWidth = 32,
int imgHeight = 32,
PdfToolBarImageTextType imageTextType = PdfToolBarImageTextType.ImageBeforeText
)
function CreateToggleButton(name, text, toolTipText, imgResName, onClick, imgWidth, imgHeight, imageTextType);
Parameters
- name String
- The name of the ToggleButton.
- text String
- The text to display on the ToggleButton.
- toolTipText String
- Specify the text that appears as a ToolTip for a control.
- imgResName String
- The image name in resources to display on the ToggleButton.
- onClick RoutedEventHandler
- An event handler that raises the Click event.
- imgWidth Int32 (Optional)
- Image width
- imgHeight Int32 (Optional)
- Image height
- imageTextType PdfToolBarImageTextType (Optional)
- Image and text layout
Return Value
ToggleButtonNewly created ToggleButton
See Also