textblock Questions
5
Solved
I have a WPF DataTemplate with two TextBlock controls (stacked) and then some other elements underneath. Due to some complicated layout code, I need to know the height of the two TextBlock elements...
3
Solved
My problem occurs with WPF in .NET 3.5 SP1 and can be described as follows:
I have a default Style hitting all TextBlock elements in my UI. That is how it looks:
<Style TargetType="{x:Type Tex...
5
Solved
According to the Windows Applications Development with Microsoft .NET 4 70-511 Training Kit
What is the difference between the Label control and TextBlock control since both are content controls a...
4
Solved
I want to bind a textblock text to a property of a static class. Whenever the property value of the static class changes, it should reflect to the textblock which is on the other window or cu...
5
Solved
The following textblock wraps and trims as expected. The elipsis "..." is displayed when the text is trimmed.
<TextBlock
MaxWidth="60"
MaxHeight="60"
Text="This is some long text which I ...
4
Solved
I am creating 'n' number of textblocks inside a stack panel programmatically. I need to change change the font size(both increase and decrease of font size) of 'n' textblocks. Is it possible to cha...
Tanishatanitansy asked 4/3, 2013 at 7:6
3
Solved
currently i have a textblock placed in a scroll viewer control. How do i make the textblock read only?
4
Solved
Is it possible to add dynamic colors to a TextBlock ..i.e. have one character in one color and the next in another color.
<TextBlock Text="{Binding no}" TextWrapping="Wrap" Margin="10,0,0,0" St...
Zolazoldi asked 3/12, 2011 at 4:38
10
Solved
I have a TextBlock in WPF. I write many lines to it, far exceeding its vertical height. I expected a vertical scroll bar to appear automatically when that happens, but it didn't. I tried to look fo...
2
Solved
I want to use font awesome (http://fortawesome.github.io/Font-Awesome/design.html) in XAML.
I have been able to easily get it to work via direct XAML, by creating a fonts folder and adding the fon...
2
Solved
I would like to show ellipsis if my filename and path do not fit in a TextBlock.
For example, if my file name and path are like:
C:\examples\example\folderA\folderB\folderC\myfilename.txt
I wou...
7
Solved
I have a TextBlock with the following setting:
TextWrapping="Wrap"
Can I determine the maximum number of lines?
for example consider the following string TextBlock.Text:
This is a very good ho...
2
If you run this code and minimize/maximize width of the window
<TextBlock TextTrimming="WordEllipsis" >
<Run Text="I want that this rectangle will be placed "/>
<Rectangle Fill="B...
Kristankriste asked 6/9, 2012 at 11:33
4
If you set TextWrapping to "Wrap", a WPF TextBlock can have several lines of text.
Is there a "clean" way to get the number of lines of text? I considered looking at the desired height and dividing...
Marasmus asked 9/7, 2009 at 19:27
1
Solved
I try to work with a concatenated text in the setter of a textblock.
textblock looks like that:
<TextBlock>
<Run Text="{x:Static languages:visuTexts.Lenght}" />
<Run Text="A [LA]...
Ushas asked 2/2, 2017 at 10:30
6
Solved
I would like to prepend a text in a data-bound text block:
<TextBlock Text="{Binding Title}" />
The text that is shown is:
"My title"
What I want to be shown is:
This is "My title"
Blayze asked 20/8, 2011 at 9:15
3
Solved
I have a WPF listbox which displays messages. It contains an avatar on the left side and the username and message stacked vertically to the right of the avatar. The layout is fine until the message...
1
Solved
I have a TextBlock whose data comes from JSON. I would like if the textblock the website address or email, the text color becomes blue and the user can click (if the email address it will go to the...
4
Solved
I have a TextBlock in a Grid with its Padding attribute set to 5. Sometimes the last character is cut off, depending on what string the Text property is set to.
<UserControl
xmlns="http://sche...
3
Solved
Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang Gaurang
I am working in WPF to create a text ticker. I am able to move the text from right to left forever but my p...
3
Solved
I'll jump to the chase: Is there any way to tell the WPF TextBlock to measure itself such that its size doesn't change when its FontWeight changes?
I have a TextBlock that changes font weights dyn...
1
Solved
My question relates to this question.
This question is quite dated, and the answer more so and it feels like it is lacking somewhat. The user created a control from scratch that is lacking somewha...
3
Is there anyway to display HTML from a string variable to the TextBlock in WPF?
2
Solved
a TextBlock is inside a Button as content.
I want the Text property of the TextBlock. Please kindly advice how I can solve this.
Below code only return ct as System.Windows.Controls.TextBlock
st...
7
Solved
I have a Textblock that is bound to a property in the ItemsSource collection. I'd like to display two properties from that class in the same textblock, but it seems I can only perform one binding a...
Mihalco asked 15/6, 2011 at 17:20
© 2022 - 2024 — McMap. All rights reserved.