Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firing an animation in a control template

0 views
Skip to first unread message

Jim T

unread,
May 10, 2008, 8:53:01 PM5/10/08
to
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

Corrado Cavalli [MVP]

unread,
May 11, 2008, 12:01:46 PM5/11/08
to
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/

Jim T

unread,
May 11, 2008, 2:07:01 PM5/11/08
to
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

0 new messages