I'd like to add the imagebutton control to my windows store app, however when I install the Winrt Xaml Toolkit using NuGet it does not allow me (using the intellisense) to add any new controls. All I'd like to do is be able to specify an image for an appBarButton when hovered and an image when pressed. I find it slightly ridiculous that Microsoft has made it so difficult. Any help is MUCH appreciated.
Asked
Active
Viewed 315 times
0
-
Hi, Filip Skakun I'm glad you saw my post as you're the Winrt Xaml Toolkit author. It looks like a great toolkit, but I can't get it to work ... that is, I can't get it to add the new controls to my project. – Zev Jun 28 '14 at 15:27
-
Sorry for a limited comment at your rant, I was using my phone and didn't have the time to get to the computer before you were able to answer your own question. I'm glad you manage to solve it yourself though. :) – Filip Skakun Jun 29 '14 at 04:28
1 Answers
1
it's funny how I can spend hours on programming with no success, then the next morning find the answer in 5 minutes. Here's the answer I needed, was found at
How can i change background image of a button when hover or click in XAML for Windows 8?
I needed to add this xml namespace at the top of the page... xmlns:controls="using:WinRTXamlToolkit.Controls"
Then this works.
<controls:ImageButton HorizonalAlignment="Center"
NormalStateImageSource="normal.png"
HoverStateImageSource="hover.png"
PressedStateImageSource="pressed.png" />
Hope this helps someone else who has the same question.