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

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

Property Value

A value of type System.Windows.Forms.ToolStripButton

Explanation

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

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

Please refer to the coding examples below.

Examples

(1) To change the image displayed in the "Aspect Ratio" button

[Visual Basic.NET]
      ToolBarSetupObjects1.ButtonAspectRatio.Image = Image.FromFile("c:\images\button_img1.bmp")

[Visual C#.NET]
      toolBarSetUpObjects1.ButtonAspectRatio.Image = Image.FromFile("c:\\images\\button_img1.bmp");

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

* Use the ToolbarSetupObjects control's ItemClicked event to determine if the button that was clicked was the target button

[Visual Basic.NET]
     Private Sub ToolBarSetupObjects1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolBarSetupObjects1.ItemClicked
          If e.ClickedItem Is ToolBarSetupObjects1.ButtonBorderColorOpacityUp Then 'The button that was clicked is the "ButtonStartArrowCapSizeUp" button
               'Write code here that you want to execute when the event fires
          End If
     End Sub

[Visual C#.NET]
      private void toolBarSetUpObjects1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
     {
          if (e.ClickedItem == toolBarSetUpObjects1.ButtonBorderColorOpacityUp)//The button that was clicked is the "ButtonBorderColorOpacityUp" button
          {
               //Write code here that you want to execute when the event fires
          }
     }

(3) Access the "ButtonBorderColorOpacityUp" button's MouseUp event.

[Visual Basic.NET]
     'In the FormLoad event, set the ButtonBorderColorOpacityUp delegate
     AddHandler ToolBarSetupObjects1.ButtonBorderColorOpacityUp.MouseUp, AddressOf ButtonBorderColorOpacityUp_MouseUp

     'event handler delegate
     Private Sub ButtonBorderColorOpacityUp_MouseUp(ByVal sender As System.Object, ByVal e As System.EventArgs)
          'Write code here that you want to execute when the event fires
     End Sub

[Visual C#.NET]
      //In the FormLoad event, set the ButtonBorderColorOpacityUp delegate
     toolBarSetUpObjects1.ButtonBorderColorOpacityUp.MouseUp += new MouseEventHandler(ButtonBorderColorOpacityUp_MouseUp);


     //event handler delegate
     private void ButtonBorderColorOpacityUp_MouseUp(object sender, EventArgs e)
     {
          //Write code here that you want to execute when the event fires
     }

See Also

ToolBarSetupObjects Members | Newtone.ImageKit.Win.ToolBarSetupObjects

 

The ImageKit.NET3 is created by Newtone Corporation