C# WPF label auto clip and append dots

XML
Copy to clipboard
fablecode
  1. <!-- Source: http://stackoverflow.com/questions/2996155/auto-clip-and-append-dots-in-wpf-label -->
  2.  
  3. <!-- Put a TextBlock inside your label and set TextTrimming to CharacterEllipsis or WordEllipsis -->
  4.  
  5. <Label>
  6.      <TextBlock TextTrimming="CharacterEllipsis">Hello World</TextBlock>
  7. </Label>

    Leave a comment

     
    Visual verification
     

    Related books

    More InfoXML Programming Success in a Day: Beginner?s Guide to Fast, Easy, and Efficient Learning of XML Programming
    XML Programming Success in a Day: Beginner?s Guide to Fast, Easy, and Efficient Learning of XML Programming
    More InfoBeginning XML
    Beginning XML
    More InfoXML: Visual QuickStart Guide (2nd Edition)
    XML: Visual QuickStart Guide (2nd Edition)
    More InfoXML in a Nutshell, Third Edition
    XML in a Nutshell, Third Edition
    More InfoMicrosoft Access 2016 Programming By Example: with VBA, XML, and ASP
    Microsoft Access 2016 Programming By Example: with VBA, XML, and ASP
    More InfoMicrosoft Excel 2013 Programming by Example with VBA, XML, and ASP (Computer Science)
    Microsoft Excel 2013 Programming by Example with VBA, XML, and ASP (Computer Science)
    More InfoLearning XML, Second Edition
    Learning XML, Second Edition
    More InfoXML Crash Course: Step by Step Guide to Mastering XML Programming
    XML Crash Course: Step by Step Guide to Mastering XML Programming