Questions tagged [textblock]

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

TextBlock is a WPF control for displaying small amounts of text. It also allows to format parts of the content by using different Inlines (e.g. Run, Span, Hyperlink)

1073 questions
-3
votes
1 answer

C# bin new Textblock object to Textblock control in XAML file

I want to show in my C#-WPF application a text containing links. The texts are static and known during compile time. The following is doing want i want when working directly on the XAML file:
theDrifter
  • 1,631
  • 6
  • 24
  • 40
-3
votes
1 answer

JDK 13 preview feature :Textblock returns false for equals and == .Is the tab spaces dependent?

equals and == return false for a text block string, though they print the same in the console. public class Example { public static void main(String[] args) { String jsonLiteral = "" + "{\n" + "\tgreeting:…
Dinesh
  • 57
  • 2
  • 8
-3
votes
2 answers

string bound to TextBlock in ComboBox doesn't show up

I have a TextBlock in a ComboBox in a C# WPF project bound to a list of 'Envelope' items, which have a string 'Name' and a double 'Weight' property, the former of which I would like to see displayed in the TextBlock. When I run my program, the…
P...
  • 655
  • 2
  • 6
  • 14
-3
votes
1 answer

Apply a property for a part of text of textblock in WPF

i want , when a part of text of textblock is 'Thomas' , around the text be blue. How do i do this?
Green
  • 1
  • 1
-4
votes
2 answers

How do you convert a TextBlock to a string in c# from WPF?

How do you convert a TextBlock to a string in c# from wpf? i have a listbox that contains a textblock in order to change the foreground color. but when i get listbox.selecteditem, it obviously returns a textblock, but i need to know what the…
darthwillard
  • 809
  • 2
  • 14
  • 28
-4
votes
1 answer
-4
votes
1 answer

Set content of textblock

I'm making WPF project. I don't have idea how I can resolve my problem so I post it here. I made my window, put some buttons, put some checkboxes, and few things more. One of this is TextBlock which is empty - I want fill it in future. My TextBlock…
-5
votes
1 answer

How to assign a string to a TextBlock?

Does anyone know how to assign a string to a textblock? e.x. I have a string, with variable content, and a textBlock. The text of the textBlock should always match the content of the string. string number; public MainPage() { //the textBlock…
Matt126
  • 997
  • 11
  • 25
1 2 3
71
72