This is a migrated thread and some comments may be shown as answers.

How to use TextDecoration and TextDecorationCollection?

5 Answers 696 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Virendra
Top achievements
Rank 1
Virendra asked on 02 Jun 2009, 10:26 PM
Hi,

How to use TextDecoration and TextDecorationCollection?

can this be uses to display cell content in Upper/Lower case?

Thanks
virendra

5 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 03 Jun 2009, 12:46 PM
Hi Virendra,

TextDecorations can only be Underline for Silverlight.
For WPF you can set it to Baseline, OverLine, Strikethrough, or Underline or combination of them.
If you want to align the text in the cell you can you TextAlignment property of the column.

Let us know if you need more information.

Kind regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
anwar
Top achievements
Rank 1
answered on 17 Feb 2010, 05:29 PM
Hello,

I want to format my datacolumn values with Underline, when i click the underline button through my toolbar the values are not shwoing any underline
can you help me what i am doing wrong. Here is the code snippet.

My toolbar contains 3 buttons - B(Bold) I(Italic) U(Underline)
page contains RadGridview(gvData) with 3 columns.

The Bold and Italic styles works fine. Undrline is not working.

private void RadRibbonRadioButton_Click(object sender, RoutedEventArgs e)  
        {  
            // Create new cell style  
            Style newstyle = new Style(typeof(GridViewCell));  
 
            switch ((sender as RadRibbonRadioButton).Tag.ToString())  
            {  
                case "Bold":  
                    newstyle.Setters.Add(new Setter(Control.FontWeightProperty, FontWeights.Bold));   
                    break;  
 
                case "Italic":  
                     newstyle.Setters.Add(new Setter(Control.FontStyleProperty, FontStyles.Italic));                      break;  
                      
                case "Underline":  
                      newstyle.Setters.Add(new Setter(TextBlock.TextDecorationsProperty, TextDecorations.Underline));                      break;   
            }  
              
                         this.gvData.Columns[1].CellStyle = newstyle;  
            this.gvData.Rebind();  
        } 
0
Vlad
Telerik team
answered on 18 Feb 2010, 01:34 PM
Hello,

You can use TextDecorations property of the column itself.

All the best,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dan
Top achievements
Rank 1
answered on 13 Dec 2012, 09:48 PM
column property is no good...don't want all cells in the column to get the textDecoration...just individual cells...how can this be achieved now that the cell textDecoration has been removed?
0
Vlad
Telerik team
answered on 14 Dec 2012, 07:47 AM
Hello,

 Check my reply on your other post

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Virendra
Top achievements
Rank 1
Answers by
Hristo
Telerik team
anwar
Top achievements
Rank 1
Vlad
Telerik team
Dan
Top achievements
Rank 1
Share this question
or