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 8284193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:00:51+00:00 2026-06-08T11:00:51+00:00

I am trying to render an activity feed kind of an UI using a

  • 0

I am trying to render an activity feed kind of an UI using a listBox in WPF. The listBox is perfectly rendering and resizes itself as the window is being resized. However, the inner items were not wrapping its contents as they should be. So, I set the width of the inner Grid to be the ActualWidth of the listBox. Here’s my XAML and some screenshots to explain what I am trying to acheive.

<Grid x:Class="MyAddin.WPFControls"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         xmlns:c="clr-namespace:MyAddin"
         mc:Ignorable="d" Background="Transparent"
         HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ShowGridLines="False" d:DesignHeight="221" d:DesignWidth="275">
<Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Stretch" 
           IsManipulationEnabled="True" Grid.Row="0" 
           Height="20" Grid.ColumnSpan="5" TextAlignment="Right" Padding="0,0,5,0" Margin="0,5,0,0" FontSize="14" FontStyle="Normal" FontWeight="ExtraLight">Activity Feed</TextBlock>
<ListBox Grid.Row="1" Name="listBox1" IsSynchronizedWithCurrentItem="True" 
         ScrollViewer.HorizontalScrollBarVisibility="Hidden"
         VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource ContainerStyle}" 
         AlternationCount="2" HorizontalContentAlignment="Stretch">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <Grid MaxWidth="{Binding ElementName=listBox1, Path=ActualWidth}" Height="40">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="34"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                    <Border Grid.Column="0">
                        <Image Source="{Binding Path=AvatarURL}" Stretch="Fill" Width="32" Height="32" />
                    </Border>
                    <StackPanel Grid.Column="1">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Path=FirstName }" TextBlock.FontWeight="Bold" 
                                   HorizontalAlignment="Left" />
                        <TextBlock><Bold> - </Bold></TextBlock>
                            <TextBlock Text="{Binding Path=TS}" TextWrapping="Wrap" 
                                   TextTrimming="WordEllipsis" FontSize="9" Margin="0,2,0,0" FontWeight="ExtraLight" />
                        </StackPanel>
                        <TextBlock Text="{Binding Path=Comment}" TextWrapping="Wrap" 
                               TextTrimming="CharacterEllipsis" HorizontalAlignment="Stretch" 
                               VerticalAlignment="Top" Padding="0,0,5,0"/>
                    </StackPanel>
            </Grid>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

and it gets rendered as image 1. If I re-size my window, the listbox contents are wrapped as I expect them. However when I resize the window back, the layout is broken as seen in image 3. I need help with solving 2 problems here:

  1. How can I fix this resizing issue.
  2. Even though the comment is being
    wrapped and trimmed. No Ellipses are being shown at the end.

PS: My app is an Outlook Addin.

Image1
Image3

  • 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-06-08T11:00:55+00:00Added an answer on June 8, 2026 at 11:00 am

    The property ScrollViewer.HorizontalScrollBarVisibility on the listBox should be disabled instead of hidden.

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

Sidebar

Related Questions

I've been trying to render a webpage using the Adobe Flex / Flash builder
I am trying to render a ViewModel using Razor and MVC3. For some reason
I'm trying to render an image to the window. Super simple (or so I
I'm trying to render images with verdana text using PHP imagettftext function. However, all
I am trying to render a float value using NSNumberFormatter's SpellOutStyle, but the results
Trying to render a partial using a fields_for block. The partial renders the form
I'm trying to render a pretty simple data structure using RABL, but I can't
I'm trying render the results of surveys from Surveryor gem as a CSV file,
trying to render the contents of an IFrame in an Asp.Net Application. This is
i´m trying to render PDF with renderpdf grails plugin, but their documentation is very

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.