Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Shadow in XAML ?

Shadow in XAML ?

Scheduled Pinned Locked Moved WCF and WF
questionwpftutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohammad Dayyan
    wrote on last edited by
    #1

    Hi How can I create shadow for an object(for example a button) with XAML thanks

    P 1 Reply Last reply
    0
    • M Mohammad Dayyan

      Hi How can I create shadow for an object(for example a button) with XAML thanks

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Use a BitmapEffect, e.g.

      <Button Name="btnAddTab" Width="60" Content="MyClick">
      <Button.BitmapEffect>
      <DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="15" Softness="1" Opacity="0.5" />
      </Button.BitmapEffect>
      </Button>

      Deja View - the feeling that you've seen this post before.

      My blog | My articles | MoXAML PowerToys

      M L 2 Replies Last reply
      0
      • P Pete OHanlon

        Use a BitmapEffect, e.g.

        <Button Name="btnAddTab" Width="60" Content="MyClick">
        <Button.BitmapEffect>
        <DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="15" Softness="1" Opacity="0.5" />
        </Button.BitmapEffect>
        </Button>

        Deja View - the feeling that you've seen this post before.

        My blog | My articles | MoXAML PowerToys

        M Offline
        M Offline
        Mohammad Dayyan
        wrote on last edited by
        #3

        Thanks Pete

        P 1 Reply Last reply
        0
        • M Mohammad Dayyan

          Thanks Pete

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          No problem, and I'm glad to help.

          Deja View - the feeling that you've seen this post before.

          My blog | My articles | MoXAML PowerToys

          1 Reply Last reply
          0
          • P Pete OHanlon

            Use a BitmapEffect, e.g.

            <Button Name="btnAddTab" Width="60" Content="MyClick">
            <Button.BitmapEffect>
            <DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="15" Softness="1" Opacity="0.5" />
            </Button.BitmapEffect>
            </Button>

            Deja View - the feeling that you've seen this post before.

            My blog | My articles | MoXAML PowerToys

            L Offline
            L Offline
            lneir
            wrote on last edited by
            #5

            FYI...if you are using .net 3.5sp1, you should move to using the new UIElement.Effect rather than the old UIElement.BitmapEffect. The new effects are hardware rendered - very fast! The old bit map effects are software rendered - slow!!! I believe there is a backwards compatibility mode so you can still use BitmapEffect for now in 3.5sp1 but it will go away eventually.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups