32 references to DeviceDpi
System.Windows.Forms (26)
System\Windows\Forms\ContextMenuStrip.cs (1)
137
&&
DeviceDpi
!= (int)PInvoke.GetDpiForWindow(this))
System\Windows\Forms\Control.cs (3)
6303
public int LogicalToDeviceUnits(int value) => ScaleHelper.ScaleToDpi(value,
DeviceDpi
);
6311
public Size LogicalToDeviceUnits(Size value) => ScaleHelper.ScaleToDpi(value,
DeviceDpi
);
6326
logicalBitmap = ScaleHelper.ScaleToDpi(logicalBitmap,
DeviceDpi
, disposeBitmap: true);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (1)
76
(control is not null && control.IsHandleCreated ? control.
DeviceDpi
: ScaleHelper.InitialSystemDpi)
System\Windows\Forms\Controls\Menus\MenuStrip.cs (4)
63
ScaleHelper.ScaleToDpi(new Padding(2, 2, 0, 2),
DeviceDpi
) :
68
ScaleHelper.ScaleToDpi(new Size(200, 24),
DeviceDpi
) :
79
? ScaleHelper.ScaleToDpi(new Padding(3, 2, 0, 2),
DeviceDpi
)
82
? ScaleHelper.ScaleToDpi(new Padding(6, 2, 0, 2),
DeviceDpi
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
939
size = ScaleHelper.ScaleToDpi(size, ScaleHelper.IsThreadPerMonitorV2Aware ?
DeviceDpi
: ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
116
ToolStripManager.CurrentDpi =
DeviceDpi
;
120
s_insertionBeamWidth = ScaleHelper.ScaleToDpi(LogicalInsertionBeamWidth,
DeviceDpi
);
121
_defaultPadding = ScaleHelper.ScaleToDpi(s_logicalDefaultPadding,
DeviceDpi
);
122
_defaultGripMargin = ScaleHelper.ScaleToDpi(s_logicalDefaultGripMargin,
DeviceDpi
);
123
s_iconSize = ScaleHelper.ScaleToDpi(LogicalIconSize,
DeviceDpi
);
543
ScaleHelper.ScaleToDpi(new Size(100, 25),
DeviceDpi
) :
3158
ToolStripManager.CurrentDpi =
DeviceDpi
;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (5)
147
ScaleObjectSizesIfNeeded(e.ToolStrip.
DeviceDpi
);
464
ScaleObjectSizesIfNeeded(toolStrip.
DeviceDpi
);
480
ScaleObjectSizesIfNeeded(e.ToolStrip.
DeviceDpi
);
695
ScaleObjectSizesIfNeeded(e.ToolStrip.
DeviceDpi
);
1171
ScaleObjectSizesIfNeeded(e.ToolStrip.
DeviceDpi
);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (4)
288
DeviceDpi
);
292
DeviceDpi
);
335
_expandImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), DownBitmapName,
DeviceDpi
);
336
_collapseImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), UpBitmapName,
DeviceDpi
);
System.Windows.Forms.UI.IntegrationTests (1)
Dpi\ToolStripItemTests.Dpi.cs (1)
50
float factor = (float)newDpi / form.
DeviceDpi
;
WinFormsControlsTest (5)
CurrentDPILabel.cs (1)
34
Text = $"Current scaling is {(int)Math.Round((
DeviceDpi
/ 96.0) * 100)}%";
DataGridViewTest.cs (2)
46
currentDPILabel1.Text =
DeviceDpi
.ToString();
51
currentDPILabel1.Text =
DeviceDpi
.ToString();
MenuStripAndCheckedListBox.cs (2)
18
currentDpiLabel.Text = $"Current scaling = {(int)Math.Round((
DeviceDpi
/ 96.0) * 100)}%";
23
currentDpiLabel.Text = $"Current scaling = {(int)Math.Round((
DeviceDpi
/ 96.0) * 100)}%";