-
Notifications
You must be signed in to change notification settings - Fork 4
Brushes And Icons
This section describes the colour brush and icon API. This provides a way for plugins to create icons and use them in different parts of the application without having to ever interact with avalonia bitmaps or images directly.
This service provides a mechanism for creating abstract delegates around Avalonia brushes.
-
CreateConstant: creates the equivalent ofImmutableSolidColorBrush -
CreateConstantLinearGradient: creates the equivalent ofImmutableLinearGradientBrush -
CreateConstantRadialGradient: creates the equivalent ofImmutableRadialGradientBrush -
GetStaticThemeBrush: creates the equivalent ofIImmutableBrush -
GetDynamicThemeBrushis more complicated. It's a subscription based object where the front end subscribes to dynamic changes of a brush via the application'sResourcesChangedandActualThemeVariantChangedevents. This allows, for example, an icon to use the standard glyph colour (which is white within dark themes and black within light themes, adjustable of course)
Icons are managed via the IconManager. This provides a way to creating different types of icons, such as images from the disk, bitmaps, custom geometry (SVG) and so on. When creating an icon, you provide brushes created by the BrushManager.
Icon can be passed to context menu entries.
Accessing underlying icon pixel data is not currently implemented but is certainly possible; SVG icons for example would have to be rendered first using
RenderTargetBitmap.
-
Home
- Connect to a console
- Scanning Options
- Scan results & Saved Address Table
- Remote Commands
- Memory Dump
- Tools
- Preferences/App Settings
-
API
- Making a custom connection
- Busy Tokens
- Models, ViewStates, MVP & Binding
- Plugins
- Config Pages
- Brushes and Icons
- Data Manager, Context Data and Data Keys
- Commands and Shortcuts
- Context Menus
- Windows and Dialogs