Skip to content

Could this be supported with a background color brush type? #3

Answered by taublast
lukewire129 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.
Actually, the properties SkiaShape is using are not WPF-inspired brushes but rather those inspired by Figma, to allow its designs to be easily recreated:
So you have properties:

  • BackgroundColor
  • FillGradient
  • StrokeGradient (+StrokeWidth, StrokeColor)

So looking at your code it can rewritten:

    BackgroundColor="Black" whatever
   <draw:SkiaShape.FillGradient>
        <draw:SkiaGradient
            EndXRatio="1"
            EndYRatio="0"
            StartXRatio="0"
            StartYRatio="1"
            Type="Linear">
            <draw:SkiaGradient.Colors>
                <Color>#0A5125</Color>
                <Color>#00FFFF</Color>
                <Color>#00FF00</Color>
           …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lukewire129
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants