Hi Mark,
Thank you for contacting Syncfusion Support.
At present, MetroForm doesn’t have support to customize the ControlBox button bounds and appearance. However, it is possible to achieve the required appearance by using Caption Images support and handling the below events.
ImageMouseMove
This event is raised when the mouse pointer moves within the caption image and displays the ToolTip.
ImageMouseUp
This event is raised when the mouse pointer is over the caption image and a mouse button is released and performs the required action.
ImageMouseEnter
This event is raised when the mouse pointer enters the caption image and highlights the color of the CaptionImage.
ImageMouseLeave
This event is raised when the mouse pointer leaves the caption image and shows the default color of the CaptionImage.
Please refer to the below code snippet.
//To Set Properties for the CaptionImages
captionImage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
captionImage1.Image = global::Metroform.Properties.Resources.Close;
captionImage1.Location = new System.Drawing.Point(760, 4);
captionImage1.Name = "CaptionImage1";
captionImage2.BackColor = System.Drawing.Color.Transparent;
captionImage2.Image = global::Metroform.Properties.Resources.max;
captionImage2.Location = new System.Drawing.Point(730, 4);
captionImage2.Name = "CaptionImage2";
captionImage3.BackColor = System.Drawing.Color.Transparent;
captionImage3.Image = global::Metroform.Properties.Resources.Minus;
captionImage3.Location = new System.Drawing.Point(703, 4);
captionImage3.Name = "CaptionImage3";
//To add Caption Images into the MetroForm
this.CaptionImages.Add(captionImage1);
this.CaptionImages.Add(captionImage2);
this.CaptionImages.Add(captionImage3); |
We have prepared a sample for your reference, which can be downloaded from below location
Screenshot:
Regards,
Keerthana