VisualStyleRenderer.GetFilename(FilenameProperty) 方法

定義

為目前的視覺化樣式項目傳回指定的檔名屬性值。Returns the value of the specified file name property for the current visual style element.

public:
 System::String ^ GetFilename(System::Windows::Forms::VisualStyles::FilenameProperty prop);
public string GetFilename (System.Windows.Forms.VisualStyles.FilenameProperty prop);
member this.GetFilename : System.Windows.Forms.VisualStyles.FilenameProperty -> string
Public Function GetFilename (prop As FilenameProperty) As String

參數

prop
FilenameProperty

FilenameProperty 的其中一個值,指定要為目前視覺樣式項目擷取的屬性值。One of the FilenameProperty values that specifies which property value to retrieve for the current visual style element.

傳回

String,包含由目前視覺化樣式項目 prop 參數所指定的屬性值。A String that contains the value of the property specified by the prop parameter for the current visual style element.

例外狀況

prop 不是其中一個 FilenameProperty 值。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. 這些檔案名會由 FilenameProperty 值封裝。These file names are encapsulated by the FilenameProperty values.

適用於