文章分類/

Infragistics|Ultimate UI for WPF|如何更改 XamDataGrid 標題的樣式(顏色、字體等)

尚無瀏覽量
2023-07-17 更新

infragistics log

要更改 XamDataGrid 標題的樣式,請創建一個針對 LabelPresenter
的樣式並在其中設置各種屬性值。並在 XamDataGrid 的 FieldSettings 的
LabelPresenterStyle 中指定該樣式。

<Window.Resources>

<Style
TargetType=“{x:Type igDP:LabelPresenter}”
x:Key=“myLabelPresenterStyle1”>

<Setter
Property=“Background”
Value=“Black”/>

<Setter
Property=“Foreground”
Value=“White”/>

<Setter
Property=“FontFamily”
Value=“Times New Roman”/>

<Setter
Property=“FontSize”
Value=“20”/>

<Setter
Property=“Height”
Value=“50”/>

</Style>
</Window.Resources>
<igDP:XamDataGrid

x:Name=“xamDataGrid1”

BindToSampleData=“True”>

<igDP:XamDataGrid.FieldSettings>

<igDP:FieldSettings

LabelPresenterStyle=“{StaticResource myLabelPresenterStyle1}”/>

</igDP:XamDataGrid.FieldSettings>
</igDP:XamDataGrid>

結果



快速跳轉目錄

✦ 群昱 AccessSoft 你的全面軟體解決方案 ✦

身為全球眾多知名軟體在台灣合作夥伴,歡迎諮詢你需要的軟體服務!

Picture of 軟體專家
軟體專家

群昱作為全球知名軟體推薦合作夥伴,致力於提供更多軟體解決方案給你!

更多軟體新知

立即詢價

請留下完整資訊,以便我們提供精確的服務內容給你。

詢價資訊