Top "Textblock" questions

TextBlock is a WPF control for displaying small amounts of text.

Bind textblock to two properties

I have a Textblock that is bound to a property in the ItemsSource collection. I'd like to display two properties …

c# silverlight xaml binding textblock
How to make the text bold of TextBlock in Silverlight?

I am developing window phone 7 application in C#. I am new to the window phone 7 application. I am also new …

silverlight windows-phone-7 dynamic-data textblock
Get Displayed Text from TextBlock

I have a simple TextBlock defined like this <StackPanel> <Border Width="106" Height="25" Margin="6" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="…

wpf text textblock texttrimming
Give TextBlock Default Value if result returns null

Hello I am trying to give a default value to a textblock if the results returned are null Here is …

c# wpf xaml textblock
How do I measure the size of a TextBlock in WPF before it is rendered?

I have a WPF DataTemplate with two TextBlock controls (stacked) and then some other elements underneath. Due to some complicated …

wpf textblock measure
C# Hyperlink in TextBlock: nothing happens when I click on it

In my C# standalone application, I want to let users click on a link that would launch their favorite browser. …

c# wpf hyperlink textblock navigateuri
WPF: How do I set the Foreground property of a TextBlock using DataTrigger

This is my XAML: <TextBlock Name="SeverityText" Grid.Column="1" Grid.Row="0" Foreground="Red"> <TextBlock.Triggers> <…

wpf textblock datatrigger foreground
Visible line count of a TextBlock

If you set TextWrapping to "Wrap", a WPF TextBlock can have several lines of text. Is there a "clean" way …

wpf wpf-controls textblock
WPF Textblock TargetNullValue not working?

I have a wpf textblock as below: <TextBlock Text="{Binding [someViewModel].SomeVar.SomeSubVar.Name, TargetNullValue='-'}"/> At my …

c# wpf xaml textblock targetnullvalue
How to remove additional padding from a WPF TextBlock?

By default a WPF TextBlock seems to have additional top and bottom padding applied. I wish this wasn't so. I've …

c# wpf xaml textblock