This project is read-only.

Round button with custom Width and Height

Mar 24, 2014 at 3:08 AM
How can I set the the round button's width and height and adjust the button's image adjust to the new size?
Mar 24, 2014 at 9:53 PM
ButtonWidth, ButtonHeight
Mar 25, 2014 at 3:28 AM
No, that didn't work.

I am using an appliction bar icon (70 x 70) as ImageSource and setting a height and width of 50 for the button. The button is resized correctly but the image keeps the original size and it looks really bad (the image looks bigger than the button).
Mar 25, 2014 at 4:09 AM
if you're using default stuff like an appbar icon, it should "just work" without having to set anything. The sample project in the source code has a ton of samples for the different properties

Without any xaml or a sample project, I have little to go on. please provide a sample project and create a bug.
Apr 13, 2014 at 7:35 PM
this is the xaml for my data template
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1">
      <Controls:RoundButton ButtonHeight="50" ButtonWidth="50" ImageSource="/Assets/Icons/appbar.msg.png" />
      <Controls:RoundButton ButtonHeight="50" ButtonWidth="50"  ImageSource="/Assets/Icons/" />
the icons that I'm using are 70x70 px, the button's circle gets the size that I set but the image size does not change.
Apr 13, 2014 at 9:52 PM
Try the Stretch property. Stretch="Uniform"
Marked as answer by carlosoj on 4/13/2014 at 2:41 PM
Apr 13, 2014 at 10:41 PM
That made it work!!! Thank you.
Just one thing that I noticed is that the when the button's size is too small, the margin between the circle and the image disappears. Anyway, for now it does what I need to achive.
Apr 13, 2014 at 10:47 PM
I need to see a sample project with what you have and a screen shot of what you want. I would use paths as well, they scale nicer and work in WinRT where the image source is WinPhone 7/8 only.