Skip to content

Instantly share code, notes, and snippets.

@KennethanCeyer
Created October 3, 2015 11:09
Show Gist options
  • Save KennethanCeyer/0c6973a8e31dc378164c to your computer and use it in GitHub Desktop.
Save KennethanCeyer/0c6973a8e31dc378164c to your computer and use it in GitHub Desktop.
ListView TextWrapping using TextBlock
ListBoxItem lb = new ListBoxItem();
TextBlock tb = new TextBlock();
/* ListView TextWrapping using TextBlock. */
tb.TextWrapping = TextWrapping.Wrap;
tb.Text = data;
lb.Content = tb;
MainChatList.Items.Add(lb);
MainChatList.SelectedIndex = MainChatList.Items.Count - 1;
MainChatList.ScrollIntoView(MainChatList.Items[MainChatList.Items.Count - 1]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment