Skip to main content

Posts

Showing posts with the label UWP SymbolIcon

UWP - How to resize SymbolIcon

UWP - Resize SymbolIcon The SymbolIcon class represents an icon that uses a glyph from the Segoe MDL2 Assets font as its content. The SymbolIcon class’s Symbol property gets or sets the Segoe MDL2 Assets glyph used as the icon content. The following UWP application development tutorial code will demonstrate how we can use SymbolIcon in an application. Mainly we demonstrate how we can resize a SymbolIcon control. Firstly, we used the Viewbox control to resize a SymbolIcon control, we put the SymbolIcon as a child control of the Viewbox container. And secondly, we resize SysmbolIcon using the CompositeTransform class and UIElement class’s RenderTransform property. The Viewbox class defines a content decorator that can stretch and scale a single child to fill the available space. The Viewbox class’s Stretch property gets or sets the Stretch mode, which determines how content fits into the available space. The Viewbox class’s StretchDirection proper...

UWP - How to use SymbolIcon

UWP SymbolIcon The SymbolIcon class represents an icon that uses a glyph from the Segoe MDL2 Assets font as its content. The SymbolIcon() constructor initializes a new instance of the SymbolIcon class. And the SymbolIcon(Symbol) constructor initializes a new instance of the SymbolIcon class using the specified symbol. The SymbolIcon(Symbol symbol) constructor has an argument named symbol which is a Symbol instance that is a named constant of the enumeration that specifies the Segoe MDL2 Assets glyph to use. The default value is null. So, using those constructors the UWP app developers can initialize a new SymbolIcon instance programmatically in their code. The Symbol enum defines constants that specify a glyph from the Segoe MDL2 Assets font to use as the content of a SymbolIcon. The enumeration has lots of useful values such as Attach, Back, Calculator, Calendar, Cancel, Clear, Copy, Crop, Cut and etc. The SymbolIcon class’s Symbol prop...