Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
65 views

Wrap text in ToolTip WPF C#

I want to wrap the text that shows my ToolTip but it does not work in any occasion. <Style TargetType="ToolTip" BasedOn="{StaticResource {x:Type ToolTip}}"> <Setter ...
Aleksandar Mijatović's user avatar
1 vote
1 answer
97 views

In WPF, long word doesn't wrap in the first line if there's some text before it [duplicate]

I'm having trouble with wrapping some text in a TextBox in WPF. Let's say I have following text "Here is some VeryLongTextThatHasToBeWrapped and so on". <TextBox Text="Here is some ...
pawros's user avatar
  • 11
0 votes
1 answer
522 views

Text wrapping single word when no space is available isn't working

A single word doesn't wrap to a new line even though there is no space to fit all of the word on the current line. Is there a way I can force it to do so? This is demonstrated on the left hand side ...
brendan's user avatar
  • 141
0 votes
1 answer
72 views

Show vertical scrollbar within a TextWrapping TextBox

I have an WPF UserControl. Within, I have a Grid which contains only a row with a few columns. There is a TextBox which I has its TextWrapping set to Wrap using an style: <Style x:Key="...
Willy's user avatar
  • 10.6k
0 votes
1 answer
466 views

WPF - dynamic width of group box in grids

I have a row on a xaml pages with three group boxes in it. Here is the code: <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> </Grid....
J. Chett's user avatar
0 votes
1 answer
70 views

How to start wrapping of a textblock from second row of a Grid?

I have 2 rows in a grid. In first row I have 5 columns, in every column I have a textblock. In second row I have a divider. Can I wrap the last textblock so that it should start from the second row of ...
tushargoyal1309's user avatar
1 vote
2 answers
306 views

WPF Textwrapping trigger on ListView IsSelected state

I am making a xaml app that has a listview. When the text is long, I am using textTrimming to shorten it but when the user clicks on the item I want the TextWrapping attribute to change from nowrap to ...
J. Chett's user avatar
2 votes
0 answers
173 views

Even word-wrapping across multiple lines in WPF

Given a toy example window: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="200" Height="100"...
Miral's user avatar
  • 12.9k
0 votes
1 answer
367 views

WrapPanel with 2 items WPF

I want to show a big text next to an image, in a resizable window. I found here that it's pssible to use a WrapPanel, but this control need a fixed width and the width of my window is not fixe. I ...
user avatar
0 votes
1 answer
542 views

WPF TextBox Wrap everywhere in string

I have a TextBox in a WPF project that contains a complex Regex pattern like this: <TextBox x:Name="tbPattern" TextWrapping="Wrap" VerticalAlignment="Stretch" FontFamily="Consolas" Text="^(?...
KnorxThieus's user avatar
0 votes
1 answer
1k views

Disable WPF RichTextBox text auto wrapping

I am using RichTexbox to display RTF text in my application, depends on windows width RichTextbox text auto wraps to next line!! I want to disable the text auto warp, instead i want to display scroll ...
Devi's user avatar
  • 1
0 votes
1 answer
213 views

Can't get Xaml TextBlock TextWrapping to work

My code is pretty straightforward: <ListView Grid.Row="0" ItemsSource="{Binding Items}" HorizontalContentAlignment="Stretch"> <ListView.ItemTemplate> <DataTemplate> ...
Doc's user avatar
  • 5,256
3 votes
1 answer
488 views

WPF Wrap items within `TreeView`

Inside a Page I have the below TreeView. How can I get the things inside the ItemsControl to wrap instead of scrolling off the edge of the page? The WrapPanel doesn't seem to be doing anything. Note ...
Matt Thomas's user avatar
  • 5,704
0 votes
1 answer
151 views

Rich TextBlock in ListViewItem Text Wrapping

I have a RichTextBlock in a ListViewItem in a ListView. I can't for the life of me findout why the text wrapping on the RichTextBlock won't apply. XAML: <ScrollViewer x:Name="MessagesScroller" ...
Adam Dernis's user avatar
3 votes
4 answers
2k views

TextBlock TextWrapping Wrap and NoWrap combined and Text through DynamicResource

I have got multiple TextBlocks whose Text is inserted through DynamicResource. They are all set to TextWrapping="Wrap". But inside those Text-strings I have words which are not allowed to be split up. ...
CR500's user avatar
  • 41
3 votes
3 answers
3k views

WPF XAML ListView - Make TextBlock Text wrap

I have a ListView with ListView.ItemTemplate like this <ListView x:Name="myList" BorderBrush="Transparent" ItemsSource="{Binding MyItems}" SelectedIndex="0" ScrollViewer....
pixel's user avatar
  • 10.5k
1 vote
1 answer
343 views

RadioButton: how can I wrap text loaded via "x:Uid"?

I want to wrap the text displayed in a radiobutton. I've tried this (derived from here) but it does not work: <RadioButton x:Uid="SettingsAICChains" > <RadioButton.Resources> ...
ema3272's user avatar
  • 1,051
1 vote
2 answers
239 views

Textalign in WPF

I have a short question about Alignments. I am using a TextBlock in XAML. When having a small window (Widht > 200) and a long Text I have to enable TextWrapping. No problem this far. The ...
Felix D.'s user avatar
  • 5,053
1 vote
2 answers
255 views

Word Wrap on WebView

I have been searching and searching and can't seem to find a solution. Is there a word wrap property for Webviews? Specifically in Universal Windows Applications. This is my webview: <WebView x:...
Code's user avatar
  • 2,119
26 votes
3 answers
43k views

Label wrapping with StackLayout

I'm using Xamarin and creating my view with XAML and I cannot for the life of me get this label to wrap the way I want it to. If the label gets to the edge of the screen, I want it to wrap like this......
stepheaw's user avatar
  • 1,703
4 votes
1 answer
7k views

Wrap text with indent in WPF textBlock

I am using a listbox to display undo redo list with data template as: <ListBox x:Name="actionList" Height="150" HorizontalAlignment="Stretch" VerticalAlignment="...
Mohit Vashistha's user avatar
9 votes
1 answer
10k views

Can I wrap the Content/text value of a RadioButton in WPF?

I have some XAML: <StackPanel Orientation="Horizontal"> <TextBlock x:Name="KeyLWP" TextWrapping="Wrap" MaxWidth="120">A Letter or Word or Phrase </TextBlock> <...
B. Clay Shannon-B. Crow Raven's user avatar
1 vote
1 answer
2k views

Preserving indenting when wrapping in a wpf textblock control

I have a WPF textblock set up with the property TextWrapping="Wrap". When I pass in a long string with a tab character (vbTab in my case) at the start, I would like the wrapping to honour ...
simonalexander2005's user avatar
1 vote
2 answers
235 views

Why can't I get my textblock to wrap

<ItemsControl ItemsSource="{Binding NavModel.NavCommands, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Grid.Column="0" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="...
Price Jones's user avatar
  • 2,008
0 votes
2 answers
129 views

Why is my TextBlock not wrapping?

I have read nearly every thread about text wrapping on the internet (ok not really) but haven't been able to come up with a solution as to why my TextBlock won't wrap. Here is the entire XAML inside ...
Sloth Armstrong's user avatar
3 votes
4 answers
1k views

Wrap text nicely in horizontal stackpanel or wrappanel?

I've seen a few other posts about this but haven't seen anything that solves my problem. Basically, I need to have some text (bold and unbold) wrap within a Stackpanel or Wrappanel nicely. Here is a ...
lhan's user avatar
  • 4,625
1 vote
1 answer
641 views

Windows Phone App - How to make text wrapping depending on device width

In my app I have a list box that contains a stack panel with text block items. The text block items have a text wrapping or text trimming property to avoid that the text block items slide outside the ...
Benny Code's user avatar
  • 54.6k
1 vote
1 answer
5k views

Windows Phone 8 - TextBlock in StackPanel not wrapping Text properly?

I have an app that is based on the Panorama control. Clicking on an item on one of the Panorama control's pages (tabs) goes to a details page. On that details page I have the XAML below that renders ...
Robert Oschler's user avatar
1 vote
3 answers
368 views

How does WPF decide how to render the textblock textwrap?

I'm trying to get my head around how WPF makes decisions when it renders a textblock with wrap enabled. I have the following code: <Window x:Class="WpfWrapTest.MainWindow" xmlns="http://...
Sjors Miltenburg's user avatar
1 vote
0 answers
194 views

AccessText TextWrapping not working with CheckBox

I am trying to implement a TextWrapping feature onto the text that is displayed in a CheckBox. I am using the second method in this walk through. I have created a completely blank program to test ...
Eric after dark's user avatar
2 votes
1 answer
932 views

Silverlight TextBlock should wrap whole words only

I have multiple TextBlocks in a control. The blocks have a fixed width and the TextWrap property is set to Wrap. The text is provided via binding. Right now the wrapping occurs when SL detects that ...
Sebastian Weber's user avatar
0 votes
1 answer
2k views

XAML TextBlock wrapping does not work

I know this was already asked a couple of times but I can't get it working. I have a data template which is used inside a listbox. Unfortunately the text and the name extends over the right border. I ...
Undiscouraged's user avatar
5 votes
2 answers
7k views

TextBlock TextWrapping not wrapping #2

OK... so this solution doesn't help XAML is here <ListBox ItemsSource="{Binding Path=ContentItems}" Background="White" > <ListBox.ItemTemplate> &...
NoWar's user avatar
  • 37.5k
9 votes
2 answers
4k views

Detect the number of line breaks in TextBlock with wrap?

Is there any way to detect the number of lines breaks in a textblock with TextWrapping="Wrap"? I am considering using a non-monospaced font. I need this because I'm creating a new and personalized ...
Guilherme's user avatar
  • 5,331
1 vote
0 answers
708 views

WPF Text in TextBlock with TextWrapping contained in CheckBox or Radiobutton is lost if Hypen is present in string

I have a very strange behavior and i am desperate by now. I Have a Big enough container to fit Checkboxes defined below, but some others have more text so i use TextWrapping, Probem is that, hyphen ...
ZERA's user avatar
  • 11
4 votes
1 answer
173 views

Big performance issue using TextWrapping and ScrollViewer

I have the following piece of XAML: <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> <TextBlock HorizontalAlignment="Stretch" Margin="10" ...
Nick's user avatar
  • 10.5k
1 vote
1 answer
3k views

Data grid height is too tall when using word-wrap in text block column

I desire to make data grid with one column representing rather lengthy text values. So my goal functionality is: Column width to be as wide as remaining window space (window can be re-sized) Word-...
Jesslyn's user avatar
  • 706
0 votes
2 answers
798 views

WrappingText in stackpanel

I have a stackpanel with 2 textblocks. The problem is that my textblocks doesn't wrap a text. What is weird, even if I have only one textblock wrapping also doesn't work. <StackPanel ...
user278618's user avatar
  • 20.2k
14 votes
8 answers
22k views

Prevent a TextBox from horizontal expanding in WPF

I have the following style defined in my App.xaml <Style x:Key="textBoxMultiline" TargetType="{x:Type TextBox}" > <Setter Property="VerticalScrollBarVisibility" Value="Auto" /> &...
dcarneiro's user avatar
  • 7,150
1 vote
1 answer
686 views

Soft hyphens in XAML?

does anybody have an idea whether it is possible to define "soft hyphens" or "soft linebreaks" in e.g. a TextBlock's text? Background: I would like to use TextWrapping="Wrap" on a TextBlock, but ...
alexander.biskop's user avatar
0 votes
2 answers
2k views

text wrapping in grid in view panel?

I want to write a questionnaire. It will be in a tab. I would like three columns: Question Number, Question, Group Box. I will have 14 of these so everything has to have their own row. The text in ...
Heather Mac's user avatar
3 votes
1 answer
2k views

Conditional XAML

For easy of development I'm using a ViewBox to wrap all content inside a Window. This is because my development machine has a smaller screen than the deployment machine so using a ViewBox allows for ...
Nicholas's user avatar
  • 1,462
17 votes
3 answers
7k views

Text wrapping in WPF hyperlink

In my WPF application I have this: <StackPanel> <TextBlock> <Hyperlink> <TextBlock TextWrapping="Wrap" Name="HyperlinkText" /> </Hyperlink> </...
svick's user avatar
  • 244k
1 vote
1 answer
5k views

Silverlight 2.0 - scroll vertically, wrap horizontally

In silverlight 2.0. I have some content that i want to scroll vertically and wrap horizontally. In the controls I have a dock panel. The DockPanel's last child, which fills it, is a ScrollViewer <...
Anthony's user avatar
  • 5,226