This property sets or retrieves the Button control displaying the "Aspect Ratio" item on the ToolBarSetupObjects control.

[Visual Basic]Public Property ButtonAspectRatio As System.Windows.Controls.Button
[C#]public System.Windows.Controls.Button ButtonAspectRatio {get; set;}

Property Value

A value of type System.Windows.Controls.Button

Explanation

The ButtonAspectRatio property sets or retrieves the Button control displaying the "Aspect Ratio" item on the ToolBarSetupObjects control.

Because the "Aspect Ratio" button is a Button control, you can use the ButtonAspectRatio property to change the "Aspect Ratio" button settings, generate events, etc.

Please refer to the examples below.

Examples

(1) To change the image displayed in the "AspectRatio" button

[Visual Basic.NET]
     Dim image As Image = new Image()
     image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute))
     ToolBarSetupObjects1.ButtonAspectRatio.Image.Content = image

[Visual C#.NET]
     Image image = new Image();
     image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute));
     toolBarSetupObjects1.ButtonAspectRatio.Image.Content = image;

(2) Access the "BorderColorOpacityUp" button's Click event.

[Visual Basic.NET]
     'Set the delegate for the ButtonBorderColorOpacityUp Click event within the FormLoad event
     AddHandler ToolBarSetupObjects1.ButtonBorderColorOpacityUp.Click, AddressOf Me.ButtonBorderColorOpacityUpt_Click

     'Event handler delegate
     Private Sub ButtonBorderColorOpacityUp_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 ButtonBorderColorOpacityUp Click event within the FormLoad event
     toolBarSetupObjects1.ButtonBorderColorOpacityUp.Click += new MouseEventHandlerButtonBorderColorOpacityUp_Click);

     //Event handler delegate
     private void ButtonBorderColorOpacityUp_Click(object sender, RoutedEventArgs e)
     {
          //Place code here that executes when this event fires
     }

See Also

ToolBarSetupObjects Members | Newtone.ImageKit.Wpf.ToolBarSetupObjects

 

The ImageKit WPF is created by Newtone Corporation