textblock Questions
12
Solved
I have TextBlock that has Inlines dynamicly added to it (basically bunch of Run objects that are either italic or bold).
In my application I have search function.
I want to be able to highlight T...
4
Solved
I have a TextBlock that is bound to a DateTime property. How do I configure the format of the date?
Pluralize asked 26/8, 2009 at 7:58
6
Solved
I have a simple TextBlock defined like this
<StackPanel>
<Border Width="106"
Height="25"
Margin="6"
BorderBrush="Black"
BorderThickness="1"
HorizontalAlignment="Left">
<TextB...
Cf asked 30/11, 2010 at 21:47
7
Solved
In my C# standalone application, I want to let users click on a link that would launch their favorite browser.
System.Windows.Controls.TextBlock text = new TextBlock();
Run run = new Run("Link Tex...
Flunk asked 5/10, 2012 at 8:48
5
EDIT:
The code below actually works as I want - this question a little misleading. Please ignore it.
Normally when I set Text property of TextBlock like this:
TextBlock tb = new TextBlock();
...
14
Solved
I'm fetching text from an XML file, and I'd like to insert some new lines that are interpreted by the textblock render as new lines.
I've tried:
<data>Foo bar baz \n baz bar</data>
...
20
Solved
How to allow TextBlock's text to be selectable?
I tried to get it to work by displaying the text using a read-only TextBox styled to look like a textblock but this will not work in my case because ...
8
Solved
I have a WP7 app where I would like to have a "clickable" TextBlock area, that when a user clicks on the TextBlock, it puts it into edit mode (a different control).
This would add another explicit ...
Churn asked 29/11, 2010 at 21:19
6
Solved
In WPF, is there any way to have the Text property of a TextBlock to contain both hard coded text and a specific binding?
What I have in mind is something along the lines of the following (ofcours...
Identify asked 25/4, 2009 at 16:6
17
Solved
How do I assign vertical center alignment to the text inside a TextBlock? I found TextAlignment property but it is for horizontal text alignment. How do I do it for vertical text alignment?
Applicative asked 29/9, 2009 at 10:6
7
Solved
I have some text that is displayed at run time in a textblock. I want
the font size to be the biggest it can be to fill the area that is
given. I think I have the textblock setup correctly to "auto...
2
Setting the default style on a TextBlock causes the style in the Label and other controls to be set as well. This only happens if you put the styles in the Application resources, when I place the s...
10
Solved
My WPF App receives a stream of messages from a backend service that I need to display in the UI. These messages vary widely and I want to have different visual layout (string formats, colors, Font...
Pandich asked 24/12, 2009 at 21:51
7
Solved
I want to gray out text in the WPF text block. how do i make it?
Regards
Raju
2
Solved
I am having problems getting the TextWrapping to work in this example. Can anyone see what I am duing wrong here?
<ListView Name="listViewReportedException" ItemsSource="{Binding ExceptionDeta...
Quarterage asked 19/6, 2012 at 12:52
16
Solved
Is there a way to have \n make a line break in a TextBlock?
<TextBlock Text="line1\nLine2" />
Or is there a better way to force a middle line break, inside the Text attribute?
<LineBre...
8
Solved
I have a TextBlock in my WPF window.
<TextBlock>
Some <Bold>formatted</Bold> text.
</TextBlock>
When it is rendered it looks like this,
Some formatted text.
My qu...
3
Solved
I have a TextBlock with a long line of text which I want to wrap. I've placed the TextBlock within a ViewBox expecting the text size to change while still wrapping, however this doesn't seem to hap...
Strawworm asked 18/7, 2013 at 8:7
8
Solved
I want all texts in TextBlock, Label, MenuItem.Header to be displayed in upper case.
The strings are taken from a ResourceDictionary e.g.:
<TextBlock Text="{StaticResource String1}"/>
<M...
Ninanincompoop asked 19/11, 2009 at 10:54
6
I want all characters in a TextBlock to be displayed in uppercase
<TextBlock Name="tbAbc"
FontSize="12"
TextAlignment="Center"
Text="Channel Name"
For...
4
Solved
I have a style guide from a designer for a button that looks like a hyperlink and I am trying to get as close to it as I can with WPF styles.
But I haven't been able to change the distance between...
5
Solved
I have a text file that contains text blocks roughly formatted like this:
Beginning of block
...
...
...
.........some_pattern.......
...
...
End of block
Beginning of block
...
... etc.
The bl...
7
Solved
The following snippet:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
&l...
4
Solved
I have some text in a db and it is as follows:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis
tellus nisl, venenatis et pharetra ac, tempor sed sapien. Integer
pellentesque blandit ...
4
Solved
I have a line of text in a textblock that reads:
"Detected [gesture] with an accuracy of [accuracy]"
In WPF, is it possible for me to be able to change the color of the elements within a textbloc...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.