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