Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Bug: Opacity modifier doesn't work inside a datatrigger for an Image

 
 
Old 04-24-2006   #1 (permalink)
Philippe Lavoie


 
 

Bug: Opacity modifier doesn't work inside a datatrigger for an Image

Hi

The following style

<Style x:Key="VisaImageStyle" TargetType="{x:Type Control}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Control}">
<Image x:Name="Card"
Source="pack://application:,,,/Images/Visa.png" Width="30" Opacity="0.6"/>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=Payment.CardType}" Value="Visa">
<Setter Property="Opacity" Value="1" TargetName="Card"/>
<Setter Property="Width" Value="40" TargetName="Card"/>
<Setter Property="BitmapEffect" Value="{StaticResource
CardShadow}" TargetName="Card"/>
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

Will properly add a drop shadow, modify the width of the image, but it
will not change the opacity of the image when the trigger is activated.

This is on the Feb CTP.

Phil

My System SpecsSystem Spec
Old 04-24-2006   #2 (permalink)
Rahul Patil


 
 

RE: Bug: Opacity modifier doesn't work inside a datatrigger for an Ima

Hi Phillipe,
Can you remove the BitmapEffect and confirm if this still repros?

[There is a bug in Feb CTP that causes opacity to not update when
BitmapEffect is applied. This is fixed for the next release (Beta 2) though.]

Thanks!
Rahul Patil

"Philippe Lavoie" wrote:

> Hi
>
> The following style
>
> <Style x:Key="VisaImageStyle" TargetType="{x:Type Control}">
> <Setter Property="Template">
> <Setter.Value>
> <ControlTemplate TargetType="{x:Type Control}">
> <Image x:Name="Card"
> Source="pack://application:,,,/Images/Visa.png" Width="30" Opacity="0.6"/>
> <ControlTemplate.Triggers>
> <DataTrigger Binding="{Binding Path=Payment.CardType}" Value="Visa">
> <Setter Property="Opacity" Value="1" TargetName="Card"/>
> <Setter Property="Width" Value="40" TargetName="Card"/>
> <Setter Property="BitmapEffect" Value="{StaticResource
> CardShadow}" TargetName="Card"/>
> </DataTrigger>
> </ControlTemplate.Triggers>
> </ControlTemplate>
> </Setter.Value>
> </Setter>
> </Style>
>
> Will properly add a drop shadow, modify the width of the image, but it
> will not change the opacity of the image when the trigger is activated.
>
> This is on the Feb CTP.
>
> Phil
>

My System SpecsSystem Spec
Old 04-25-2006   #3 (permalink)
Philippe Lavoie


 
 

Re: Bug: Opacity modifier doesn't work inside a datatrigger for anIma

You are correct. Removing the Bitmap effect fixes the problem. Any ideas
when Beta 2 will be out the door.

Phil

Rahul Patil wrote:
> Hi Phillipe,
> Can you remove the BitmapEffect and confirm if this still repros?
>
> [There is a bug in Feb CTP that causes opacity to not update when
> BitmapEffect is applied. This is fixed for the next release (Beta 2) though.]
>
> Thanks!
> Rahul Patil
>
> "Philippe Lavoie" wrote:
>
>
>>Hi
>>
>>The following style
>>
>><Style x:Key="VisaImageStyle" TargetType="{x:Type Control}">
>> <Setter Property="Template">
>> <Setter.Value>
>> <ControlTemplate TargetType="{x:Type Control}">
>> <Image x:Name="Card"
>>Source="pack://application:,,,/Images/Visa.png" Width="30" Opacity="0.6"/>
>> <ControlTemplate.Triggers>
>> <DataTrigger Binding="{Binding Path=Payment.CardType}" Value="Visa">
>> <Setter Property="Opacity" Value="1" TargetName="Card"/>
>> <Setter Property="Width" Value="40" TargetName="Card"/>
>> <Setter Property="BitmapEffect" Value="{StaticResource
>>CardShadow}" TargetName="Card"/>
>> </DataTrigger>
>> </ControlTemplate.Triggers>
>> </ControlTemplate>
>> </Setter.Value>
>> </Setter>
>></Style>
>>
>>Will properly add a drop shadow, modify the width of the image, but it
>>will not change the opacity of the image when the trigger is activated.
>>
>>This is on the Feb CTP.
>>
>>Phil
>>

My System SpecsSystem Spec
Old 05-01-2006   #4 (permalink)
Rahul Patil


 
 

Re: Bug: Opacity modifier doesn't work inside a datatrigger for an

We are working on getting it out the door, the dates are not finalized though
(sorry ).

Thanks!
Rahul Patil.

"Philippe Lavoie" wrote:

> You are correct. Removing the Bitmap effect fixes the problem. Any ideas
> when Beta 2 will be out the door.
>
> Phil
>
> Rahul Patil wrote:
> > Hi Phillipe,
> > Can you remove the BitmapEffect and confirm if this still repros?
> >
> > [There is a bug in Feb CTP that causes opacity to not update when
> > BitmapEffect is applied. This is fixed for the next release (Beta 2) though.]
> >
> > Thanks!
> > Rahul Patil
> >
> > "Philippe Lavoie" wrote:
> >
> >
> >>Hi
> >>
> >>The following style
> >>
> >><Style x:Key="VisaImageStyle" TargetType="{x:Type Control}">
> >> <Setter Property="Template">
> >> <Setter.Value>
> >> <ControlTemplate TargetType="{x:Type Control}">
> >> <Image x:Name="Card"
> >>Source="pack://application:,,,/Images/Visa.png" Width="30" Opacity="0.6"/>
> >> <ControlTemplate.Triggers>
> >> <DataTrigger Binding="{Binding Path=Payment.CardType}" Value="Visa">
> >> <Setter Property="Opacity" Value="1" TargetName="Card"/>
> >> <Setter Property="Width" Value="40" TargetName="Card"/>
> >> <Setter Property="BitmapEffect" Value="{StaticResource
> >>CardShadow}" TargetName="Card"/>
> >> </DataTrigger>
> >> </ControlTemplate.Triggers>
> >> </ControlTemplate>
> >> </Setter.Value>
> >> </Setter>
> >></Style>
> >>
> >>Will properly add a drop shadow, modify the width of the image, but it
> >>will not change the opacity of the image when the trigger is activated.
> >>
> >>This is on the Feb CTP.
> >>
> >>Phil
> >>

>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Modifier la métabase IIS 6 en via script VB Script
sidebar opacity Vista General
Modifier keys show up as tooltips on monitor Vista General


Vista Forums 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 Ltd

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