共用方式為


GridView.ColumnHeaderToolTip 屬性

定義

當滑鼠指標暫停在某一欄標題時,會取得或設定工具提示的內容。

public:
 property System::Object ^ ColumnHeaderToolTip { System::Object ^ get(); void set(System::Object ^ value); };
public object ColumnHeaderToolTip { get; set; }
member this.ColumnHeaderToolTip : obj with get, set
Public Property ColumnHeaderToolTip As Object

屬性值

一個物件,代表當滑鼠指標暫停在某欄標題時,會以工具提示形式呈現的內容。 預設值尚未定義。

範例

以下範例說明如何設定該 ColumnHeaderToolTip 屬性。

<GridView AllowsColumnReorder="true"
          ColumnHeaderToolTip="Employee Information">
</GridView>
GridView myGridView = new GridView();
myGridView.AllowsColumnReorder = true; 
myGridView.ColumnHeaderToolTip = "Employee Information";
Dim myGridView As New GridView()
myGridView.AllowsColumnReorder = True
myGridView.ColumnHeaderToolTip = "Employee Information"

備註

此特性代表了排版與樣式欄位標題的多種方式之一。 欲了解更多資訊,請參閱 GridView 欄位標頭樣式與範本總覽

XAML 屬性使用方式

<object ToolTip="toolTipContent"/>

XAML 屬性元素的使用

<object>
  <object.ToolTip>
    <ToolTip .../>
  </object.ToolTip>
</object>
- or -
<object>
  <object.ToolTip>
    toolTipObjectContent
  </object.ToolTip>
</object>

XAML 值

toolTipContent 一個字串,成為 的顯示文字 ColumnHeaderToolTip

toolTipObjectContent 一個用作提示內容的物件。 通常,這個物件是 FrameworkElement 定義 的 ColumnHeaderToolTip佈局元素,例如文字元素。 在此用法中, ToolTip 元素會隱含由解析後的 XAML 建立,並將 toolTipObjectContent 該內容設定為其 ContentControl.Content 屬性。

< ToolTip....../> 看。ToolTip

相依財產資訊

項目 價值
識別碼欄位 ColumnHeaderToolTipProperty
元資料屬性設為 true 沒有

適用於