MRadioButton
Home
Components
MRadioButton
About component
Radio buttons allow the user to select one option from a set while seeing all available options.
What has changed?
MRadioButton functions like a standard WinForms radio button. Only look of control was tweaked.
How to use it?
Like other controls, MRadioButton can be simply droped from toolbox on the form. If you are not using IDE with integrated form designer (like Visual Studio), you can always create a radio button programmatically:
// Initialize radio-button first
MRadioButton radio = new MRadioButton();
// Set location
radio.Location = new Point(50, 50);
// Don't forget to add our newly created
// radio-button to form's control collection.
targetForm.Controls.Add(radio);
using System;
using System.Windows.Forms;
using Minimal.Components;
namespace Demo
{
public partial class MyForm : Form
{
// Initialize radio-button first
MRadioButton radio = new MRadioButton();
// Form constructor
public MyForm()
{
InitializeComponent();
// Set size and location
radio.Location = new Point(50, 50);
// Don't forget to add our newly created
// radio-button to form's control collection.
Controls.Add(radio);
}
}
}
Code example asumes, that targetForm variable is form where you want to have your color-box placed. If you are working inside a class derived from System.Windows.Forms.Form, you can of course replace targetForm variable with this keyword or in latest version of C# omit form reference completely. See second example above.
Class content
Assembly |
Minimal.dll |
Namespace |
Minimal.Components |
Inheritance |
RadioButton |
Attributes |
Minimal.Components.Design.RadioButtonDesigner |
Implements |
IMComponent |
This list doesn’t include content derived from the parent class. See Microsoft’s official RadioButton class documentation for a complete list of items.
Constructors
Name |
Description |
|
MRadioButton() |
Initializes a new instance of the MRadioButton class. |
|
Properties
Name |
Description |
Type |
Component |
Handles life-cycle of the M-Component. |
MComponent |
Accent |
Component’s accent color. Main visible color of the component. |
Color |
CustomTheme |
Component’s custom theme. Will override default parent M-form theme or application wide theme. |
Theme |
Fields
Name |
Description |
Type |
- |
- |
- |
Events
Name |
Description |
Type |
AccentChanged |
Fires when the Accent property is changed. |
PropertyChangedEventHandler |
CustomThemeChanged |
Fires when the CustomTheme property is changed. |
PropertyChangedEventHandler |
Methods
Name |
Description |
Returns |
- |
- |
- |