79 references to CheckBoxState
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (3)
1024System.Windows.Forms.VisualStyles.CheckBoxState state = System.Windows.Forms.VisualStyles.CheckBoxState.CheckedDisabled; 1027state = System.Windows.Forms.VisualStyles.CheckBoxState.UncheckedDisabled;
System.Windows.Forms (58)
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (49)
25public static bool IsBackgroundPartiallyTransparent(CheckBoxState state) 49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 50public static void DrawCheckBox(Graphics g, Point glyphLocation, CheckBoxState state) 73CheckBoxState state, 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 91CheckBoxState state) => DrawCheckBox( 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 110CheckBoxState state) => DrawCheckBox(g, glyphLocation, textBounds, checkBoxText, font, flags, focused, state, HWND.Null); 120CheckBoxState state, 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 165CheckBoxState state) => DrawCheckBox( 190CheckBoxState state) 230public static Size GetGlyphSize(Graphics g, CheckBoxState state) => GetGlyphSize((IDeviceContext)g, state); 232internal static Size GetGlyphSize(IDeviceContext deviceContext, CheckBoxState state, HWND hwnd = default) 243internal static Size GetGlyphSize(HDC hdc, CheckBoxState state, HWND hwnd) 255internal static ButtonState ConvertToButtonState(CheckBoxState state) => state switch 257CheckBoxState.CheckedNormal or CheckBoxState.CheckedHot => ButtonState.Checked, 258CheckBoxState.CheckedPressed => (ButtonState.Checked | ButtonState.Pushed), 259CheckBoxState.CheckedDisabled => (ButtonState.Checked | ButtonState.Inactive), 260CheckBoxState.UncheckedPressed => ButtonState.Pushed, 261CheckBoxState.UncheckedDisabled => ButtonState.Inactive, 263CheckBoxState.MixedNormal or CheckBoxState.MixedHot => ButtonState.Checked, 264CheckBoxState.MixedPressed => (ButtonState.Checked | ButtonState.Pushed), 265CheckBoxState.MixedDisabled => (ButtonState.Checked | ButtonState.Inactive), 269internal static CheckBoxState ConvertFromButtonState(ButtonState state, bool isMixed, bool isHot) 275return CheckBoxState.MixedPressed; 279return CheckBoxState.MixedDisabled; 283return CheckBoxState.MixedHot; 286return CheckBoxState.MixedNormal; 292return CheckBoxState.CheckedPressed; 296return CheckBoxState.CheckedDisabled; 300return CheckBoxState.CheckedHot; 303return CheckBoxState.CheckedNormal; 310return CheckBoxState.UncheckedPressed; 314return CheckBoxState.UncheckedDisabled; 318return CheckBoxState.UncheckedHot; 321return CheckBoxState.UncheckedNormal; 325private static bool IsMixed(CheckBoxState state) => state switch 327CheckBoxState.MixedNormal 328or CheckBoxState.MixedHot 329or CheckBoxState.MixedPressed 330or CheckBoxState.MixedDisabled => true, 334private static bool IsDisabled(CheckBoxState state) => state switch 336CheckBoxState.CheckedDisabled or CheckBoxState.UncheckedDisabled or CheckBoxState.MixedDisabled => true, 345&& IsDisabled((CheckBoxState)state)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
656Size checkBoxSize = CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal); 698FlatStyle.Flat => CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 3, 699FlatStyle.Popup => CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 2, 1152CheckBoxState themeCheckBoxState = CheckBoxState.UncheckedNormal; 1184checkBoxSize = CheckBoxRenderer.GetGlyphSize(g, CheckBoxState.UncheckedNormal); 1189checkBoxSize = CheckBoxRenderer.GetGlyphSize(g, CheckBoxState.UncheckedNormal);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (2)
523VisualStyles.CheckBoxState cbState = CheckBoxRenderer.ConvertFromButtonState( 556VisualStyles.CheckBoxState cbState = CheckBoxRenderer.ConvertFromButtonState(
System.Windows.Forms.Tests (18)
System\Windows\Forms\CheckBoxRendererTests.cs (18)
14[InlineData(CheckBoxState.CheckedNormal)] 15[InlineData(CheckBoxState.MixedNormal)] 16public void CheckBoxRenderer_DrawCheckBox(CheckBoxState cBState) 43[InlineData(CheckBoxState.CheckedNormal)] 44[InlineData(CheckBoxState.MixedNormal)] 45public void CheckBoxRenderer_DrawCheckBox_OverloadWithSizeAndText(CheckBoxState cBState) 48if (cBState == CheckBoxState.CheckedNormal 84[InlineData(TextFormatFlags.Default, CheckBoxState.CheckedNormal)] 85[InlineData(TextFormatFlags.Default, CheckBoxState.MixedNormal)] 86[InlineData(TextFormatFlags.GlyphOverhangPadding, CheckBoxState.MixedHot)] 87[InlineData(TextFormatFlags.PreserveGraphicsTranslateTransform, CheckBoxState.CheckedPressed)] 88[InlineData(TextFormatFlags.TextBoxControl, CheckBoxState.UncheckedNormal)] 89public void CheckBoxRenderer_DrawCheckBox_VisualStyleOn_OverloadWithTextFormat(TextFormatFlags textFormat, CheckBoxState cBState) 121[InlineData(CheckBoxState.CheckedNormal, true)] 122[InlineData(CheckBoxState.MixedNormal, true)] 123[InlineData(CheckBoxState.CheckedNormal, false)] 124[InlineData(CheckBoxState.MixedNormal, false)] 125public void CheckBoxRenderer_DrawCheckBox_OverloadWithHandle(CheckBoxState cBState, bool focus)