32 references to IsSupported
System.Windows.Forms (11)
System\Windows\Forms\Application.cs (1)
555=> ComCtlSupportsVisualStyles && VisualStyleRenderer.IsSupported;
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (1)
24public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\Controls\ProgressBar\ProgressBarRenderer.cs (1)
22public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1330internal bool IsExplorerTreeSupported => OwnerGrid.CanShowVisualStyleGlyphs && VisualStyleRenderer.IsSupported;
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (1)
22public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (1)
23public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\Controls\ToolStrips\ProfessionalColors.cs (1)
216if (VisualStyleRenderer.IsSupported)
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (1)
23public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (1)
22public static bool IsSupported => VisualStyleRenderer.IsSupported; // no downlevel support
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
87if (!IsSupported) 173=> !IsSupported
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ToolStripItemGlyph.cs (1)
46if (Item is ToolStripComboBox && VisualStyles.VisualStyleRenderer.IsSupported)
System.Windows.Forms.Tests (20)
System\Windows\Forms\DataGridViewHeaderCellTests.cs (16)
3842yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3845yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3848yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3851yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3854yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3857yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 4001ButtonState expected = VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal; 4037Assert.Equal(enableHeadersVisualStyles && VisualStyleRenderer.IsSupported, cell.MouseLeaveUnsharesRow(rowIndex)); 4138yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4141yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4144yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4147yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4150yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4212Assert.Equal(VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal, cell.ButtonState); 4517ButtonState expectedButtonState1 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal; 4518ButtonState expectedButtonState2 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Normal : expectedButtonState1;
System\Windows\Forms\ProgressBarRendererTest.cs (1)
14bool expectedValue = VisualStyleRenderer.IsSupported;
System\Windows\Forms\TrackBarRendererTests.cs (1)
32isSupported.Should().Be(VisualStyleRenderer.IsSupported);
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (2)
86bool result = VisualStyleRenderer.IsSupported; 88Assert.Equal(result, VisualStyleRenderer.IsSupported);