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