TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Expression

Notices

Reply
 
Thread Tools Display Modes
Old 11-05-2008, 07:56 AM   #1
Jim T
Guest
 
Posts: n/a
Firing an animation in a control template

I have a button in my app that I want to use to turn on a camera. The part
giving me trouble is trying to animate the button when the camera is turned
on. I have a boolean property in the window the button is in called
"Broadcasting", which is true when the camera is on.

I'm attempting to perform the animation of the button with no code-behind
(which I could do by writing a custom control, but the point is to be able to
work with designers and have them play with template animations for tasks
such as this.)

I thought maybe I could use the "tag" property, which I bound to the
"Broadcasting" property, but when I attempt to add a new property trigger to
the button's template and select "tag" as the property, the only state option
is "null", and I have been unsuccessful in changing it via Blend.

Armed with all this info, I am looking for any way that I can get the fact
that the camera is broadcasting to the template in a way the designer can use
it in Blend. Maybe it could be an event (is there a way to get my own events
to show up in blend? Maybe it could be a property... same question... can I
get my own properties to show up as a property trigger in Blend. Or maybe I
can use the "tag" property, if I could figure out how to make Blend change if
from anything other that a tested null state.

Hope this makes sense, and thanks
--
Jim
  Reply With Quote
Old 11-05-2008, 10:54 PM   #2
Corrado Cavalli [MVP]
Guest
 
Posts: n/a
Re: Firing an animation in a control template

Think the quickest solution is to inherit from the standard button, add a
IsBroadcasting dependency property then use that button.
In this way you should be able to use the new property for the trigger and
what designer has to do is simply using the new button instead of default
one.

HTH

--
Corrado Cavalli [Microsoft .NET MVP-MCP]
UGIdotNET - http://www.ugidotnet.org
Weblog: http://blogs.ugidotnet.org/corrado/

  Reply With Quote
Old 12-05-2008, 12:56 AM   #3
Jim T
Guest
 
Posts: n/a
Re: Firing an animation in a control template

I think your right Corrado. I was just hoping there was a way to have Blend
do this. If you break this down as a general workflow such as:
1. Developer provides ability to turn on/off a feature.
2. Developer provides ability to determine status of the feature.
3. Designer makes a control (button in this case) to turn on/off a feature.
4. Designer overrides control template to make control fit with visual design.
5. Designer adds visual feature to same control showing a status of that
feature
embedded in the control.

This just seems like something I would expect designers to do fairly often,
and was hoping I was missing something.

Thank you for your answer, your a true asset to this group. Maybe when I
get to a point where I feel I'm not behind the 8-ball with my code I will do
a bit more giving back.
--
Jim


"Corrado Cavalli [MVP]" wrote:

> Think the quickest solution is to inherit from the standard button, add a
> IsBroadcasting dependency property then use that button.
> In this way you should be able to use the new property for the trigger and
> what designer has to do is simply using the new button instead of default
> one.
>
> HTH
>
> --
> Corrado Cavalli [Microsoft .NET MVP-MCP]
> UGIdotNET - http://www.ugidotnet.org
> Weblog: http://blogs.ugidotnet.org/corrado/
>
>

  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 11:52 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional