This property sets or retrieves the "BackColor" button of the ToolBarStandard control.
[Visual Basic]Public Property ButtonBackColor
As System.Windows.Controls.Button
[C#]public System.Windows.Forms.Button
ButtonBackColor {get; set;}
Property Value
A value of type System.Windows.Controls.Button
Explanation
The ButtonBackColor property sets or retrieves the "BackColor" button of the ToolBarStandard. The "BackColor" button is a Button control. By using the ButtonBackColor property, you can change "BackColor" button settings, generate events, etc.
Please refer to the examples below.
Examples
(1) To change the image displayed in the "Fill" button
[Visual Basic.NET]
Dim image As Image = new Image()
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute))
ToolBarStandard1.ButtonFill.Image.Content = image
[Visual C#.NET]
Image image = new Image();
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute));
toolBarStandard1.ButtonFill.Image.Content = image;
Dim image As Image = new Image()
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute))
ToolBarStandard1.ButtonFill.Image.Content = image
[Visual C#.NET]
Image image = new Image();
image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute));
toolBarStandard1.ButtonFill.Image.Content = image;
(2) Access the "ButtonPenWidthUp" button's Click event.
[Visual Basic.NET]
'Set the delegate for the ButtonPenWidthUp Click event within the FormLoad event
AddHandler ToolBarStandard1.ButtonPenWidthUp.Click, AddressOf Me.ButtonPenWidthUp_Click
'Event handler delegate
Private Sub ButtonPenWidthUp_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 ButtonPenWidthUp Click event within the FormLoad event
toolBarStandard1.ButtonPenWidthUp.Click += new MouseEventHandler(ButtonPenWidthUp_Click);
//Event handler delegate
private void ButtonPenWidthUp_Click(object sender, RoutedEventArgs e)
{
//Place code here that executes when this event fires
}
'Set the delegate for the ButtonPenWidthUp Click event within the FormLoad event
AddHandler ToolBarStandard1.ButtonPenWidthUp.Click, AddressOf Me.ButtonPenWidthUp_Click
'Event handler delegate
Private Sub ButtonPenWidthUp_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 ButtonPenWidthUp Click event within the FormLoad event
toolBarStandard1.ButtonPenWidthUp.Click += new MouseEventHandler(ButtonPenWidthUp_Click);
//Event handler delegate
private void ButtonPenWidthUp_Click(object sender, RoutedEventArgs e)
{
//Place code here that executes when this event fires
}
See Also
ToolBarStandard Members | Newtone.ImageKit.Wpf.ToolBarStandard