61 references to CheckBoxState
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (3)
1030
System.Windows.Forms.VisualStyles.
CheckBoxState
state = System.Windows.Forms.VisualStyles.
CheckBoxState
.CheckedDisabled;
1033
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,
1160
CheckBoxState
themeCheckBoxState =
CheckBoxState
.UncheckedNormal;
1192
checkBoxSize = CheckBoxRenderer.GetGlyphSize(g,
CheckBoxState
.UncheckedNormal);
1197
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(