Live Chat Icon For mobile
Live Chat Icon

How can I create a combined hard and soft shadow ?

Platform: WPF| Category: Rendering Graphics

This can be done as follows.

[XAML]

<!-- Hard shadow on top of soft shadow. -->
<TextBlock
  Text='Shadow Text'
  Foreground='CornflowerBlue'>
  <TextBlock.BitmapEffect>
    <BitmapEffectGroup>
      <BitmapEffectGroup.Children>
        <DropShadowBitmapEffect
          ShadowDepth='5'
          Direction='330'
          Color='DarkSlateBlue'
          Opacity='0.75'
          Softness='0.50' />
        <DropShadowBitmapEffect
          ShadowDepth='2'
          Direction='330'
          Color='Maroon'
          Opacity='0.5'
          Softness='0.0' />
      </BitmapEffectGroup.Children>
    </BitmapEffectGroup>
  </TextBlock.BitmapEffect>
</TextBlock> 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.