Free Code Snippets in C#, Net Framework, Office 365, ASP.Net,WPF, Visual Studio, SQL Server, Antivirus free
#

WPF Windows Font icons with Segoe MDL2 Asset

 

 

With a trick WPF and C # can be installed in Windows applications under Windows.

FontFamily: Segoe MDL2 assets

One can enter the font a FrameworkElements or UIElements into the Properties-> Text-> Font

 

 

Segoe in XAML

Under XAML one gives the code as here one with Kaufmanns-And-Hashtag & # and semicolon;

<Button x:Name="btnSize" Click="btnSize_Click" Grid.Column="0" FontFamily="Segoe MDL2 Assets"

FontSize="22" >&#xE740;</Button>

 

 

 

In WPF C # Segoe UI Runtime Symbol Code:

The symbol code is set at runtime by converting the content or text from UTF to displayed text.

Here & # x must be replaced by 0x and the semicolon is omitted

 

            //----< Set SegoeUI Symbol in WPF >----

            //&#xE740; Fullscreen

            //&#xE73F; BackToWindow

 

            if (this.WindowState != WindowState.Maximized)

            {

                this.WindowState = WindowState.Maximized;

                btnSize.Content = Char.ConvertFromUtf32(0xE73F);// "&#xE73F;" //BackToWindow

            }

            else

            {

                this.WindowState = WindowState.Normal;

                btnSize.Content = Char.ConvertFromUtf32(0xE740); //"&#xE740;"; //Fullscreen

            }

            //----</ Set SegoeUI Symbol in WPF >----

 

 

 

Segoe MDL font icons and icons

Codes for the symbols and icons can be found at:

[Lnk "http://modernicons.io/segoe-mdl2/cheatsheet/" /]

 

The codes are always at the top of WPF

 

& # XE740; For fullscreen

& # XE73F; For Normal or BackToWindow

 

UWP

Under UWP the same symbols are used as FontIcon or Symbol

 

Mobile
»
XAML: Text break in the button
»
WPF Windows Font icons with Segoe MDL2 Asset
»
WPF: Order files
»
WPF: Open Windows File Explorer
»
WPF: how do I find the MainWindow
»
WPF: Application Link, Shortcut erstellen und in Startup Folder legen
»
WPF: Settings speichern zum Programm, Anwendung
»
WPF: Zeilenumbruch in einer Messagebox
»
WPF: Minimize to Tray
»
WPF: Zeilenumbruch in WPF Button

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de