This property sets or retrieves the Button control displaying the "ClosePenLine" item on the ToolBarSetupLines control.
[Visual Basic]Public Property
ButtonClosePenLine As System.Windows.Controls.Button
[C#]public System.Windows.Controls.Button
ButtonClosePenLine {get; set;}
Property Value
A value of type System.Windows.Controls.Button
Explanation
The ButtonClosePenLine property sets or retrieves the Button control displaying the "ClosePenLine" item on the ToolBarSetupLines control.
Because the "ClosePenLine" button is a Button control, you can use the ButtonClosePenLine property to change the "ClosePenLine" button settings, generate events, etc.
Please refer to the examples below.
Examples
(1) To change the image displayed in the "ClosePenLine" button
[Visual Basic.NET]
Dim image As Image = new Image()
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute))
ToolBarSetupLines1.ButtonClosePenLine.Image.Content = image
[Visual C#.NET]
Image image = new Image();
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute));
toolBarSetupLines1.ButtonClosePenLine.Image.Content = image;
Dim image As Image = new Image()
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute))
ToolBarSetupLines1.ButtonClosePenLine.Image.Content = image
[Visual C#.NET]
Image image = new Image();
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute));
toolBarSetupLines1.ButtonClosePenLine.Image.Content = image;
(2) Access the "StartArrowCapSizeUp" button's Click event.
[Visual Basic.NET]
'Set the delegate for the ButtonStartArrowCapSizeUp Click event within the FormLoad event
AddHandler ToolBarSetupLines1.ButtonStartArrowCapSizeUp.Click, AddressOf Me.ButtonStartArrowCapSizeUp_Click
'Event handler delegate
Private Sub ButtonStartArrowCapSizeUp_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
'Place code here that executes when this event fires
End Sub
[Visual C#.NET]
//Set the delegate for the ButtonStartArrowCapSizeUp Click event within the FormLoad event
toolBarSetupLines1.ButtonStartArrowCapSizeUp.Click += new MouseEventHandler(ButtonStartArrowCapSizeUp_Click);
//Event handler delegate
private void ButtonStartArrowCapSizeUp_Click(object sender, RoutedEventArgs e)
{
//Place code here that executes when this event fires
}
'Set the delegate for the ButtonStartArrowCapSizeUp Click event within the FormLoad event
AddHandler ToolBarSetupLines1.ButtonStartArrowCapSizeUp.Click, AddressOf Me.ButtonStartArrowCapSizeUp_Click
'Event handler delegate
Private Sub ButtonStartArrowCapSizeUp_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
'Place code here that executes when this event fires
End Sub
[Visual C#.NET]
//Set the delegate for the ButtonStartArrowCapSizeUp Click event within the FormLoad event
toolBarSetupLines1.ButtonStartArrowCapSizeUp.Click += new MouseEventHandler(ButtonStartArrowCapSizeUp_Click);
//Event handler delegate
private void ButtonStartArrowCapSizeUp_Click(object sender, RoutedEventArgs e)
{
//Place code here that executes when this event fires
}
See Also
ToolBarSetupLines Members | Newtone.ImageKit.Wpf.ToolBarSetupLines