Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6353817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:28:33+00:00 2026-05-24T22:28:33+00:00

I have a listbox that is bound to a database query result. I’m using

  • 0

I have a listbox that is bound to a database query result. I’m using an item template that shows the subject on one line and I want it to show preview of the body on another line. What I’m wondering is that– obviously the body is going to be way too long to fit in there, can I somehow set it to only display the first so many characters and append an ellipses after that, like a preview? Or even something close would be fine. So for example:

Instead of displaying:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
vitae eros nibh. Pellentesque habitant morbi tristique senectus et
netus et malesuada fames ac turpis egestas. Donec augue metus, iaculis
id porta non, pellentesque quis turpis. Donec rutrum diam eget tortor
bibendum vel blandit odio iaculis. Curabitur pretium adipiscing orci,
ut pulvinar justo vehicula non. Mauris nec ipsum velit. Sed et auctor
nibh. Proin ac ultricies tellus.

It would display something like

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse…

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:28:34+00:00Added an answer on May 24, 2026 at 10:28 pm

    You can use ‘TextTrimming’ Property of a Textblock. Set TextTrimming = “CharacterEllipsis”. You might need to play with Width to manage how many characters you really want to display.

    <TextBlock TextTrimming="CharacterEllipsis" Text="This is a sample long text. This will get Trimmed."/>
    

    Add this textblock in your item template

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a listbox that has its selected item bound to a property
I have a listbox in WPF that's bound to a ObservableCollection using the ItemSource
I have a ListBox that is bound to a list of Persons. I want
I have a ListBox that displays a number of usercontrols that are bound to
I have a ListBox that when in focus, and when I have an item
I have a listbox that displays Shipment Items (custom class) that are formatted using
I have a ListBox that is bound to a list of CustomerViewModel-objects, that each
Say I have a ListBox that is bound to an observable collection on my
I have a ListBox that is being bound to data from a WCF service.
I have a WPF listbox control that is declaratively bound to a textbox. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.