Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

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

Closed Thread
 
Thread Tools Display Modes
Old 01-31-2006   #1 (permalink)
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"
Old 01-31-2006   #2 (permalink)
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"



Old 02-21-2006   #3 (permalink)
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"

>
>
>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
service cannot accept control messages at this time jhoppe Vista General 0 07-18-2008 01:10 AM
user account control taking long time on large files mikee Vista General 0 04-30-2008 12:06 PM
The service cannot accept control messages at this time. reganjen System Security 0 02-29-2008 04:10 AM
Parental control time limits Theo Carr-Brion Vista account administration 9 03-30-2007 01:58 AM
Anomolous settings in Date & Time control dialogued displayed Michael F. LaTerz Vista performance & maintenance 1 10-30-2006 06:17 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50