Skip to content

FontSelectDialog

JaykeBird edited this page Feb 21, 2023 · 7 revisions

Back to home | Back to Reference | View raw text

FontSelectDialog class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SolidShineUi
  SolidShineUi.FontSelectDialog[[FontSelectDialog]]
  SolidShineUi.FlatWindow[[FlatWindow]]
  end
  subgraph System.Windows.Markup
System.Windows.Markup.IComponentConnector[[IComponentConnector]]
  end
System.Windows.Markup.IComponentConnector --> SolidShineUi.FontSelectDialog
SolidShineUi.FlatWindow --> SolidShineUi.FontSelectDialog
Loading

Members

Properties

Public properties

Type Name Methods
bool DialogResult
Get or set the result of the dialog. Set to true if the user clicked OK.
get, set
bool PreserveFontFallback
If a font fallback sequence is defined in the FontFamily, preserve it even if the user changes the font. If preserved, only the first found font will be changed and the remaining values will be preserved.
get, set
string PreviewText
Get or set the preview text displayed at the bottom of the dialog, to allow the user to see how their font selections look.
get, set
FontFamily SelectedFontFamily
Get or set the font family selected in the dialog.
get, set
double SelectedFontSize
Get or set the selected font size in the dialog.
get, set
FontStyle SelectedFontStyle
Get or set the selected font style in the dialog.
get, set
FontWeight SelectedFontWeight
Get or set the selected font weight in the dialog.
get, set
TextDecorationCollection SelectedTextDecorations
Get or set the selected text decorations in the dialog.
get, set
bool ShowDecorations
Get or set if the text decorations section of the dialog is visible.
get, set
bool ShowSizes
Get or set if the font sizes section of the dialog is visible.
get, set
bool ShowStyles
Get or set if the font styles section of the dialog is visible.
get, set
bool ShowWeights
Get or set if the font weights section of the dialog is visible.
get, set

Methods

Public methods

Returns Name
void InitializeComponent()
InitializeComponent
void LoadFromControl(...)
Load in the selected values of this dialog from a control.
void SetToControl(...)
Set a control's font properties to match the selected values of the dialog.

Internal methods

Returns Name
Delegate _CreateDelegate(Type delegateType, string handler)

Details

Inheritance

Constructors

FontSelectDialog

public FontSelectDialog()
Summary

Create a FontSelectDialog.

Methods

LoadFromControl [1/2]

public void LoadFromControl(Control element)
Arguments
Type Name Description
Control element The control to load from.
Summary

Load in the selected values of this dialog from a control.

Remarks

If the control is a TextBox, it will also load in the TextDecorations; otherwise, no text decorations are loaded.

LoadFromControl [2/2]

public void LoadFromControl(TextBlock element)
Arguments
Type Name Description
TextBlock element The TextBlock to load from.
Summary

Load in the selected values of this dialog from a TextBlock control.

SetToControl [1/2]

public void SetToControl(Control element)
Arguments
Type Name Description
Control element The control to set.
Summary

Set a control's font properties to match the selected values of the dialog.

Remarks

If the control is a TextBox, it will also set the TextDecorations property.

SetToControl [2/2]

public void SetToControl(TextBlock element)
Arguments
Type Name Description
TextBlock element The TextBlock to set.
Summary

Set a TextBlock's font properties to match the selected values of the dialog.

InitializeComponent

public virtual void InitializeComponent()
Summary

InitializeComponent

_CreateDelegate

internal Delegate _CreateDelegate(Type delegateType, string handler)
Arguments
Type Name Description
Type delegateType
string handler

Properties

DialogResult

public bool DialogResult { get; set; }
Summary

Get or set the result of the dialog. Set to true if the user clicked OK.

PreserveFontFallback

public bool PreserveFontFallback { get; set; }
Summary

If a font fallback sequence is defined in the FontFamily, preserve it even if the user changes the font. If preserved, only the first found font will be changed and the remaining values will be preserved.

SelectedFontFamily

public FontFamily SelectedFontFamily { get; set; }
Summary

Get or set the font family selected in the dialog.

SelectedFontWeight

public FontWeight SelectedFontWeight { get; set; }
Summary

Get or set the selected font weight in the dialog.

SelectedFontSize

public double SelectedFontSize { get; set; }
Summary

Get or set the selected font size in the dialog.

SelectedFontStyle

public FontStyle SelectedFontStyle { get; set; }
Summary

Get or set the selected font style in the dialog.

SelectedTextDecorations

public TextDecorationCollection SelectedTextDecorations { get; set; }
Summary

Get or set the selected text decorations in the dialog.

ShowStyles

public bool ShowStyles { get; set; }
Summary

Get or set if the font styles section of the dialog is visible.

ShowDecorations

public bool ShowDecorations { get; set; }
Summary

Get or set if the text decorations section of the dialog is visible.

ShowWeights

public bool ShowWeights { get; set; }
Summary

Get or set if the font weights section of the dialog is visible.

ShowSizes

public bool ShowSizes { get; set; }
Summary

Get or set if the font sizes section of the dialog is visible.

PreviewText

public string PreviewText { get; set; }
Summary

Get or set the preview text displayed at the bottom of the dialog, to allow the user to see how their font selections look.

Generated with ModularDoc

Clone this wiki locally