|
Dieser Artikel wurde maschinell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
|
Übersetzung
Original
|
SizeF-Konstruktor (Single, Single)
Namespace: System.Drawing
Assembly: System.Drawing (in System.Drawing.dll)
Parameter
- width
- Typ: System.Single
Die Breitenkomponente der neuen SizeF-Struktur.
- height
- Typ: System.Single
Die Höhenkomponente der neuen SizeF-Struktur.
private void AddShadow(PaintEventArgs e) { // Create two SizeF objects. SizeF shadowSize = listBox1.Size; SizeF addSize = new SizeF(10.5F, 20.8F); // Add them together and save the result in shadowSize. shadowSize = shadowSize + addSize; // Get the location of the ListBox and convert it to a PointF. PointF shadowLocation = listBox1.Location; // Add two points to get a new location. shadowLocation = shadowLocation + new Size(5, 5); // Create a rectangleF. RectangleF rectFToFill = new RectangleF(shadowLocation, shadowSize); // Create a custom brush using a semi-transparent color, and // then fill in the rectangle. Color customColor = Color.FromArgb(50, Color.Gray); SolidBrush shadowBrush = new SolidBrush(customColor); e.Graphics.FillRectangles(shadowBrush, new RectangleF[]{rectFToFill}); // Dispose of the brush. shadowBrush.Dispose(); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core-Rolle wird nicht unterstützt), Windows Server 2008 R2 (Server Core-Rolle wird mit SP1 oder höher unterstützt; Itanium wird nicht unterstützt)
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.