TX Text Control .NET for WPF

ForeColorDialog Method

Method|Introduced in 22.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Invokes the built-in dialog box for setting the text color.

Syntax

public DialogResult ForeColorDialog();

Return Value

If the dialog has been left with the Cancel button the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

Examples

The following example opens the fore color dialog for the text control.

var result = textControl.ForeColorDialog();
Console.WriteLine($"Fore Color Dialog result: {result}");