VisualStyleRenderer.GetFilename Method

Returns the value of the specified file name property for the current visual style element.

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in

public string GetFilename (
	FilenameProperty prop
public String GetFilename (
	FilenameProperty prop
public function GetFilename (
	prop : FilenameProperty
) : String
Not applicable.



One of the FilenameProperty values that specifies which property value to retrieve for the current visual style element.

Return Value

A String that contains the value of the property specified by the prop parameter for the current visual style element.

Exception typeCondition


prop is not one of the FilenameProperty values.

Visual styles can specify the names of image files that are used to draw a particular element in different sizes and resolutions. These file names are encapsulated by the FilenameProperty values.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions