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)
6344public int LogicalToDeviceUnits(int value) => ScaleHelper.ScaleToDpi(value, DeviceDpi); 6352public Size LogicalToDeviceUnits(Size value) => ScaleHelper.ScaleToDpi(value, DeviceDpi); 6367logicalBitmap = 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)
63ScaleHelper.ScaleToDpi(new Padding(2, 2, 0, 2), DeviceDpi) : 68ScaleHelper.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)
939size = ScaleHelper.ScaleToDpi(size, ScaleHelper.IsThreadPerMonitorV2Aware ? DeviceDpi : ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
116ToolStripManager.CurrentDpi = DeviceDpi; 120s_insertionBeamWidth = ScaleHelper.ScaleToDpi(LogicalInsertionBeamWidth, DeviceDpi); 121_defaultPadding = ScaleHelper.ScaleToDpi(s_logicalDefaultPadding, DeviceDpi); 122_defaultGripMargin = ScaleHelper.ScaleToDpi(s_logicalDefaultGripMargin, DeviceDpi); 123s_iconSize = ScaleHelper.ScaleToDpi(LogicalIconSize, DeviceDpi); 541? ScaleHelper.ScaleToDpi(new Size(100, 25), DeviceDpi) 3156ToolStripManager.CurrentDpi = DeviceDpi;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (5)
147ScaleObjectSizesIfNeeded(e.ToolStrip.DeviceDpi); 464ScaleObjectSizesIfNeeded(toolStrip.DeviceDpi); 480ScaleObjectSizesIfNeeded(e.ToolStrip.DeviceDpi); 695ScaleObjectSizesIfNeeded(e.ToolStrip.DeviceDpi); 1171ScaleObjectSizesIfNeeded(e.ToolStrip.DeviceDpi);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (4)
296DeviceDpi); 300DeviceDpi); 343_expandImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), DownBitmapName, DeviceDpi); 344_collapseImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), UpBitmapName, DeviceDpi);
System.Windows.Forms.UI.IntegrationTests (1)
Dpi\ToolStripItemTests.Dpi.cs (1)
50float factor = (float)newDpi / form.DeviceDpi;
WinFormsControlsTest (5)
CurrentDPILabel.cs (1)
34Text = $"Current scaling is {(int)Math.Round((DeviceDpi / 96.0) * 100)}%";
DataGridViewTest.cs (2)
46currentDPILabel1.Text = DeviceDpi.ToString(); 51currentDPILabel1.Text = DeviceDpi.ToString();
MenuStripAndCheckedListBox.cs (2)
18currentDpiLabel.Text = $"Current scaling = {(int)Math.Round((DeviceDpi / 96.0) * 100)}%"; 23currentDpiLabel.Text = $"Current scaling = {(int)Math.Round((DeviceDpi / 96.0) * 100)}%";