Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to change color of part from the text in textblock wpf

1.
TextBlock textBlock = new TextBlock { Inlines = { new Run { Text = "some text: " }, new Run { Text = "some text", Foreground = Brushes.White } } };

2.
textblock.Inlines.Clear();
textblock.Inlines.Add(new Run("text"));
textblock.Inlines.Add(new Run("text") { Foreground = Brushes.White });
Comment

PREVIOUS NEXT
Code Example
Csharp :: setting the parent of a transform which resides in a prefab 
Csharp :: serenity frameword order column 
Csharp :: loading player preferences unity 
Csharp :: double parse csharp removes decimal 
Csharp :: how to update model in entity framework db first approach 
Csharp :: Why Duplicate "..TargetFrameworkAttribute" c# assemblies created 
Csharp :: render world space UI infront of everything unity 
Csharp :: run dll file 
Csharp :: How do I allow edit only a particular column in datagridview in windows application 
Csharp :: linq from list c# 
Csharp :: linq c# object except two lists 
Csharp :: c# json 
Csharp :: unity DOScale 
Csharp :: top down view movement script 
Csharp :: Get Mouse World Position 
Csharp :: GetComponent<Button().onClick 
Csharp :: Send Hotmail, Outlook, Office365 Email using SMTP C# .NET 
Csharp :: c# loop through queue 
Csharp :: blazor image button 
Csharp :: declare multiple variables in for loop C# 
Csharp :: uwp roaming data sample 
Csharp :: 2d array rows and columns in c# 
Csharp :: static constructor in c# 
Csharp :: c# switch expression pattern matching 
Csharp :: how create two database conction in laravel 
Csharp :: c# faker 
Csharp :: c# get all id of list object 
Csharp :: c# multiple exceptions same handler 
Csharp :: change a positive number to negative or a negative number to positive 
Csharp :: unity fixedupdate 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =