作成日: 2026/06/24 最終更新日: 2026/06/24
文書種別
使用方法
詳細
ボタン型セル(ButtonCellType)の背景色は、以下のサンプルコードのように、TargetTypeプロパティにButtonEditElementクラスを指定してBackgroundプロパティを設定することで変更できます。
◎サンプルコード(XAML)
◎サンプルコード(XAML)
<Window.Resources> <Style TargetType="sg:ButtonEditElement"> <Setter Property="Background" Value="Blue"></Setter> </Style> </Window.Resources>◎サンプルコード(VB)
Dim btn As New ButtonCellType() btn.Content = "ボタン" GcSpreadGrid1.ColumnHeader(0, 0).CellType = btn◎サンプルコード(C#)
ButtonCellType btn = new ButtonCellType(); btn.Content = "ボタン"; GcSpreadGrid1.Columns[0].CellType = btn;