Click here to Skip to main content
15,891,136 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: General guidance - A WPF Grid Pin
Ian Shlasko17-Dec-10 8:07
Ian Shlasko17-Dec-10 8:07 
GeneralRe: General guidance - A WPF Grid Pin
Rob Philpott19-Dec-10 22:36
Rob Philpott19-Dec-10 22:36 
Questionadding a non microsoft silverlight .dll Pin
arkiboys17-Dec-10 4:08
arkiboys17-Dec-10 4:08 
AnswerRe: adding a non microsoft silverlight .dll Pin
Pete O'Hanlon17-Dec-10 4:27
mvePete O'Hanlon17-Dec-10 4:27 
GeneralRe: adding a non microsoft silverlight .dll Pin
arkiboys17-Dec-10 6:13
arkiboys17-Dec-10 6:13 
AnswerRe: adding a non microsoft silverlight .dll Pin
Abhinav S17-Dec-10 5:59
Abhinav S17-Dec-10 5:59 
AnswerRe: adding a non microsoft silverlight .dll Pin
#realJSOP21-Dec-10 0:16
mve#realJSOP21-Dec-10 0:16 
Questionstoryboard automatically undoing [modified] Pin
Chazzysb17-Dec-10 0:58
Chazzysb17-Dec-10 0:58 
Hi,

Silverlight 4, Expression Blend 3

I understand template triggers in WPF are not available in Silverlight...
I used Blend to create a button template - i want the button to grow in size on the mouseover event.
I added a transition to the button in Blend and it generated the zaml...
Im assuming the latest fashion is 'VisualStateManager.VisualStateGroups' instead of triggers to do this in Silverlight...
This works fine but when the animation is complete the button resizes itself to the original size - I want the button to retain its size while the mouse is over.

Ive listed the relevant zaml below - ive tried setting storyboard properties but still the button flicks back to its original size once the animation is complete.

Does anyone know how I can retain the buttons size?

Thanks,
Chas



<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused"/>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="00:00:00" To="MouseOver">
<Storyboard AutoReverse="False" SpeedRatio="1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.654"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.16"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Pressed"/>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>

modified on Friday, December 17, 2010 7:35 AM

AnswerRe: storyboard automatically undoing Pin
Chazzysb17-Dec-10 2:31
Chazzysb17-Dec-10 2:31 
QuestionChange WPF TextBox border when it has focus Pin
astibich216-Dec-10 13:10
astibich216-Dec-10 13:10 
AnswerRe: Change WPF TextBox border when it has focus Pin
SledgeHammer0116-Dec-10 18:53
SledgeHammer0116-Dec-10 18:53 
AnswerRe: Change WPF TextBox border when it has focus Pin
Khaniya17-Dec-10 1:25
professionalKhaniya17-Dec-10 1:25 
AnswerRe: Change WPF TextBox border when it has focus Pin
Tarun.K.S19-Dec-10 19:25
Tarun.K.S19-Dec-10 19:25 
AnswerRe: Change WPF TextBox border when it has focus Pin
scottytk3-Jan-11 7:59
scottytk3-Jan-11 7:59 
Questionwcf web.config Pin
arkiboys16-Dec-10 0:34
arkiboys16-Dec-10 0:34 
AnswerRe: wcf web.config Pin
Steve Maier17-Dec-10 4:41
professionalSteve Maier17-Dec-10 4:41 
AnswerRe: wcf web.config Pin
phil.o17-Dec-10 5:03
professionalphil.o17-Dec-10 5:03 
Questionsilverlight 4 app. to be accessible by others Pin
arkiboys15-Dec-10 21:01
arkiboys15-Dec-10 21:01 
AnswerRe: silverlight 4 app. to be accessible by others Pin
Pete O'Hanlon15-Dec-10 22:56
mvePete O'Hanlon15-Dec-10 22:56 
AnswerRe: silverlight 4 app. to be accessible by others Pin
Vimalsoft(Pty) Ltd19-Dec-10 21:31
professionalVimalsoft(Pty) Ltd19-Dec-10 21:31 
Questiondeploy silverlight 4 Pin
arkiboys14-Dec-10 22:16
arkiboys14-Dec-10 22:16 
AnswerRe: deploy silverlight 4 Pin
Abhinav S14-Dec-10 23:19
Abhinav S14-Dec-10 23:19 
AnswerRe: deploy silverlight 4 Pin
Pete O'Hanlon14-Dec-10 23:51
mvePete O'Hanlon14-Dec-10 23:51 
GeneralRe: deploy silverlight 4 Pin
arkiboys15-Dec-10 2:55
arkiboys15-Dec-10 2:55 
QuestionFindName Not Working [modified] Pin
Kevin Marois14-Dec-10 13:40
professionalKevin Marois14-Dec-10 13:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.