Skip to content

How to customise style Image

whistyun edited this page Dec 5, 2020 · 1 revision

Abstract

All Image are created as CImage which can customise class your self. Markdown.Avalonia treat title as class.

![alt](imageurl "title")

Example

Style

<!--
    xmlns:ctxt="clr-namespace:ColorTextBlock.Avalonia;assembly=ColorTextBlock.Avalonia"
-->

<Style Selector="ctxt|CImage.Tall">
    <Setter Property="LayoutWidth" Value="50"/>
    <Setter Property="LayoutHeight" Value="100"/>
</Style>
<Style Selector="ctxt|CImage.Wide">
    <Setter Property="LayoutWidth" Value="100"/>
    <Setter Property="LayoutHeight" Value="50"/>
</Style>
<Style Selector="ctxt|CImage.Small">
    <Setter Property="LayoutWidth" Value="50"/>
    <Setter Property="LayoutHeight" Value="50"/>
</Style>

Markdown

![](https://www.nuget.org/profiles/whistyun/avatar)
![](https://www.nuget.org/profiles/whistyun/avatar "Tall")
![](https://www.nuget.org/profiles/whistyun/avatar "Wide")
![](https://www.nuget.org/profiles/whistyun/avatar "Small")

View

view

Support Styles

  • LayoutWidth
  • LayoutHeight