<DataTemplate x:Key ="UnderLineTemplate">
<TextBlock Text="{Binding}" TextDecorations="UnderLine"/>
</DataTemplate>
ButtonCellType button = new ButtonCellType();
button.Content = "Custom TextFormat";
button.ContentTemplate = this.Resources["UnderLineTemplate"] as DataTemplate;
gcSpreadGrid1[0,0].CellType = button;
Dim button As New ButtonCellType()
button.Content = "Custom TextFormat"
button.ContentTemplate = TryCast(Me.Resources("UnderLineTemplate"), DataTemplate)
gcSpreadGrid1(0, 0).CellType = button