How to use TextDecoration and TextDecorationCollection?

6 posts, 0 answers
  1. Virendra
    Virendra avatar
    50 posts
    Member since:
    Aug 2012

    Posted 02 Jun 2009 Link to this post

    Hi,

    How to use TextDecoration and TextDecorationCollection?

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

    Thanks
    virendra
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 03 Jun 2009 Link to this post

    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.
  3. anwar
    anwar avatar
    23 posts
    Member since:
    Jun 2009

    Posted 17 Feb 2010 Link to this post

    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();  
            } 
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 18 Feb 2010 Link to this post

    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.
  5. Dan
    Dan avatar
    22 posts
    Member since:
    Jun 2011

    Posted 13 Dec 2012 Link to this post

    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?
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 14 Dec 2012 Link to this post

    Hello,

     Check my reply on your other post

    Regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top