Windows Vista Forums

Can I use ShadowEffect at the same time as I use Clip fo control?
  1. #1


    Kirill Tropin (KTropin@gmail.com) Guest

    Can I use ShadowEffect at the same time as I use Clip fo control?

    <Button.Clip>
    <RectangleGeometry RadiusX="3" RadiusY="3" Rect="0,0,89,28"/>
    </Button.Clip>
    <Button.BitmapEffect>
    <DropShadowBitmapEffect Color="Black" ShadowDepth="3" Opacity="0.7"
    Softness="0.015" Direction="330"/>
    </Button.BitmapEffect>

    I get only "clip"



      My System SpecsSystem Spec

  2. #2


    Michael Latta Guest

    Re: Can I use ShadowEffect at the same time as I use Clip fo control?

    The bitmap effect is part of the drawing for this element, so it is being
    clipped also. Change the template for the button (using a style) to change
    the outline, rather than using clipping.

    Michael


    "Kirill Tropin (KTropin@gmail.com)"
    <KirillTropinKTropingmailcom@discussions.microsoft.com> wrote in message
    news:317A9FF1-A6D0-4D35-A913-C5F4E4861777@microsoft.com...
    > <Button.Clip>
    > <RectangleGeometry RadiusX="3" RadiusY="3" Rect="0,0,89,28"/>
    > </Button.Clip>
    > <Button.BitmapEffect>
    > <DropShadowBitmapEffect Color="Black" ShadowDepth="3" Opacity="0.7"
    > Softness="0.015" Direction="330"/>
    > </Button.BitmapEffect>
    >
    > I get only "clip"




      My System SpecsSystem Spec

  3. #3


    Rahul Patil Guest

    Re: Can I use ShadowEffect at the same time as I use Clip fo contr

    The order of operations on a Visual is (if they are set):
    1. Apply Opacity / OpacityMask
    2. Apply Effects (Shadow,blur, glow, bevel, emboss)
    3. Apply Clip
    4. Apply Render/Layout transorms

    Hence, a clip is applied AFTER the shadow is applied underneath.

    If you want to change the order a bit, you could use a <Border> element to
    contain the Button, and apply the shadow to the Border.
    <Border>
    <Border.BitmapEffect>
    <DropShadowBitmapEffect Color="Red"/>
    </Border.BitmapEffect>
    <Button>
    ...
    </Button>
    </Border>


    "Michael Latta" wrote:

    > The bitmap effect is part of the drawing for this element, so it is being
    > clipped also. Change the template for the button (using a style) to change
    > the outline, rather than using clipping.
    >
    > Michael
    >
    >
    > "Kirill Tropin (KTropin@gmail.com)"
    > <KirillTropinKTropingmailcom@discussions.microsoft.com> wrote in message
    > news:317A9FF1-A6D0-4D35-A913-C5F4E4861777@microsoft.com...
    > > <Button.Clip>
    > > <RectangleGeometry RadiusX="3" RadiusY="3" Rect="0,0,89,28"/>
    > > </Button.Clip>
    > > <Button.BitmapEffect>
    > > <DropShadowBitmapEffect Color="Black" ShadowDepth="3" Opacity="0.7"
    > > Softness="0.015" Direction="330"/>
    > > </Button.BitmapEffect>
    > >
    > > I get only "clip"

    >
    >
    >


      My System SpecsSystem Spec

Can I use ShadowEffect at the same time as I use Clip fo control? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting properties on hosted toolstrip control at design time Mike .NET General 1 31 Jul 2009
Cannot accept control messages at this time robang13 Vista General 4 18 Oct 2008
service cannot accept control messages at this time jhoppe Vista General 0 18 Jul 2008
The service cannot accept control messages at this time. reganjen System Security 0 29 Feb 2008
Parental control time limits Theo Carr-Brion Vista account administration 9 30 Mar 2007