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

how to display .... at the end of the textblock when content exceeds the maximum width

3 Answers 73 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 08 May 2013, 11:05 AM
Hi There,

I have a requirement where i have to display ... at the end of the text of textblock when the content exceeds maximum limit, i have tried many ways but i am unable to get the solution, i thought you are also faced the same problem in your development, so you may have the better solution, can you please tell me how we can do this?

Regards,
Srinivas.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 08 May 2013, 12:50 PM
Hi Srinivas,

In order to display "...", you should set the TextTrimming property for the TextBlock. For example: 

<TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Value}"/>

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ravi
Top achievements
Rank 1
answered on 09 May 2013, 03:17 AM
Hi Didie,

Thanks for reply,

i want to display this in silverlight textblock, may be you are thought about the WPF. i dont see this in the Silverlight, please see the attached image.

is there any way that i can display the ellipses in the silverlight textblock?

I appreciate for your help.

Regards,
Srinivas.
0
Dimitrina
Telerik team
answered on 09 May 2013, 09:36 AM
Hello,

You are right.
In that case you can use WordEllipsis:

<telerik:GridViewDataColumn.CellTemplate>
  <DataTemplate>
    <TextBlock TextTrimming="WordEllipsis" Text="{Binding Name}"/>
  </DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
Ravi
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Ravi
Top achievements
Rank 1
Share this question
or