Search code examples
c#windows-8winrt-xaml

creating WintRT XAML control : image with a text panel that slide up on mouse over


I need to create a small xaml control (for a windows 8 application / WintRT) This control is a simple button that surround an image with a text block at the bottom of the image. The text block should be hiddent and slide up when the user pass his mouse over the button like in this image:

sample picture
(source: skynet.be)

I have the button, the image and the textblock, but I don't know how I can hide the textblock and slide it up on mouse over.

Could anyone help me?

Thanks


Solution

  • Replace the button's ControlTemplate with an image and a text block. Use VisualStateManager and Hover state to animate TextBlock.

    This might be some help: Simple hover effect in XAML?