When You Want A User To Notice A Button

HTML Got Rid Of Blink

But that doesn’t mean you can’t reproduce it. Well, I’m not using HTML; I’m using WPF. Our users were consistently missing a button because they would get into a click-through freenzy. I decided to make it standout a little more with this code:

            <Button x:Name="btn16x16"
                Command="{Binding Path=ClipboardClickCommand}"
                ToolTip="Copy Summary Content to Clipboard">
                        <Canvas Width="18" Height="18">
                            <Image Name="imgCopyHiglight"
                                    <EventTrigger RoutedEvent="Image.Loaded">
                                        <BeginStoryboard Name="BeginImgStoryboard">
                                                <DoubleAnimation AutoReverse="True"
                                                             To="0.0" />
                                    <EventTrigger RoutedEvent="Image.MouseDown">
                                        <StopStoryboard BeginStoryboardName="BeginImgStoryboard" />
                                                <DoubleAnimation AutoReverse="False"
                                                             To="0.0" />
                            <Image Name="imgCopy"
                               Source="/Installer;component/Resources/Images/page_copy.png" />

What Does That Do?

It takes this image Page Copy and overlays this image Page Highlight on top of it. The opacity of the image changes from 1 to 0 to 1 every 1/2 second. Of course, you switch the Panel.ZOrder from the highlight image to the other image and it will give a red glow outline to your pulse. The pulse also stops when the user performs a MouseDown event (to click the button).

Tagged , . Bookmark the permalink.

About Mike

I'm a software engineer. Look into the about page for more information about me.

Comments are closed.