83 references to RadioButtonState
System.Windows.Forms (36)
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (36)
26public static bool IsBackgroundPartiallyTransparent(RadioButtonState state) 49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 50public static void DrawRadioButton(Graphics g, Point glyphLocation, RadioButtonState state) => 56RadioButtonState state, 67RadioButtonState state, 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 95RadioButtonState state) 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 111RadioButtonState state) 124RadioButtonState state, 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 165RadioButtonState state) => DrawRadioButton( 190RadioButtonState state) => DrawRadioButton( 213RadioButtonState state, 251public static Size GetGlyphSize(Graphics g, RadioButtonState state) 257internal static Size GetGlyphSize(HDC hdc, RadioButtonState state, HWND hwnd) 268internal static ButtonState ConvertToButtonState(RadioButtonState state) => state switch 270RadioButtonState.CheckedNormal or RadioButtonState.CheckedHot => ButtonState.Checked, 271RadioButtonState.CheckedPressed => ButtonState.Checked | ButtonState.Pushed, 272RadioButtonState.CheckedDisabled => ButtonState.Checked | ButtonState.Inactive, 273RadioButtonState.UncheckedPressed => ButtonState.Pushed, 274RadioButtonState.UncheckedDisabled => ButtonState.Inactive, 278internal static RadioButtonState ConvertFromButtonState(ButtonState state, bool isHot) 284return RadioButtonState.CheckedPressed; 288return RadioButtonState.CheckedDisabled; 292return RadioButtonState.CheckedHot; 295return RadioButtonState.CheckedNormal; 302return RadioButtonState.UncheckedPressed; 306return RadioButtonState.UncheckedDisabled; 310return RadioButtonState.UncheckedHot; 313return RadioButtonState.UncheckedNormal; 320RadioButtonState radioButtonState = (RadioButtonState)state; 323&& (radioButtonState == RadioButtonState.CheckedDisabled || radioButtonState == RadioButtonState.UncheckedDisabled)
System.Windows.Forms.Tests (47)
System\Windows\Forms\RadioButtonRendererTests.cs (47)
14[InlineData(RadioButtonState.CheckedNormal)] 15[InlineData(RadioButtonState.CheckedPressed)] 16public void RadioButtonRenderer_DrawRadioButton(RadioButtonState rBState) 45[InlineData(RadioButtonState.CheckedNormal)] 46[InlineData(RadioButtonState.CheckedPressed)] 47public void RadioButtonRenderer_DrawRadioButton_OverloadWithSizeAndText(RadioButtonState rBState) 79[InlineData(TextFormatFlags.Default, RadioButtonState.CheckedNormal)] 80[InlineData(TextFormatFlags.Default, RadioButtonState.CheckedPressed)] 81[InlineData(TextFormatFlags.PreserveGraphicsTranslateTransform, RadioButtonState.CheckedPressed)] 82[InlineData(TextFormatFlags.TextBoxControl, RadioButtonState.UncheckedNormal)] 84RadioButtonState rBState) 135RadioButtonState.CheckedNormal, 159[InlineData(RadioButtonState.CheckedNormal)] 160[InlineData(RadioButtonState.CheckedPressed)] 161[InlineData(RadioButtonState.CheckedDisabled)] 162[InlineData(RadioButtonState.UncheckedNormal)] 163[InlineData(RadioButtonState.UncheckedPressed)] 164[InlineData(RadioButtonState.UncheckedDisabled)] 165public void IsBackgroundPartiallyTransparent_ReturnsExpected(RadioButtonState state) 232RadioButtonState state = RadioButtonState.CheckedNormal; 258RadioButtonState state = RadioButtonState.UncheckedNormal; 274[InlineData(RadioButtonState.CheckedNormal)] 275[InlineData(RadioButtonState.CheckedPressed)] 276[InlineData(RadioButtonState.UncheckedNormal)] 277[InlineData(RadioButtonState.UncheckedPressed)] 278public void GetGlyphSize_ReturnsExpectedSize(RadioButtonState state) 310RadioButtonState state = RadioButtonState.CheckedNormal; 332[InlineData(RadioButtonState.CheckedNormal, ButtonState.Checked)] 333[InlineData(RadioButtonState.CheckedHot, ButtonState.Checked)] 334[InlineData(RadioButtonState.CheckedPressed, ButtonState.Checked | ButtonState.Pushed)] 335[InlineData(RadioButtonState.CheckedDisabled, ButtonState.Checked | ButtonState.Inactive)] 336[InlineData(RadioButtonState.UncheckedPressed, ButtonState.Pushed)] 337[InlineData(RadioButtonState.UncheckedDisabled, ButtonState.Inactive)] 338[InlineData(RadioButtonState.UncheckedNormal, ButtonState.Normal)] 339public void ConvertToButtonState_ReturnsExpected(RadioButtonState radioState, ButtonState expected) 345[InlineData(ButtonState.Checked, false, RadioButtonState.CheckedNormal)] 346[InlineData(ButtonState.Checked, true, RadioButtonState.CheckedHot)] 347[InlineData(ButtonState.Checked | ButtonState.Pushed, false, RadioButtonState.CheckedPressed)] 348[InlineData(ButtonState.Checked | ButtonState.Inactive, false, RadioButtonState.CheckedDisabled)] 349[InlineData(ButtonState.Pushed, false, RadioButtonState.UncheckedPressed)] 350[InlineData(ButtonState.Inactive, false, RadioButtonState.UncheckedDisabled)] 351[InlineData(ButtonState.Normal, false, RadioButtonState.UncheckedNormal)] 352[InlineData(ButtonState.Normal, true, RadioButtonState.UncheckedHot)] 353public void ConvertFromButtonState_ReturnsExpected(ButtonState buttonState, bool isHot, RadioButtonState expected)