Control the size of the image in ToastPrompt?

Mar 10, 2013 at 12:42 AM

I'm trying to get the ToastPrompt to size the image provided in the ImageSource property. The image I'm providing to it is much bigger than what I want displayed. Is there anyway to get the control to shrink the displayed size of the image? I'd like to specify say a 50x50 display size.

Thanks in advance.
Mar 11, 2013 at 6:39 AM
Edited Mar 11, 2013 at 6:40 AM
The easy WP8 solution would be to shift your BitmapImage slightly to include DecodePixelHeight and Width. This then reduces the image size as well in-app memory while the image is being displayed.
return new ToastPrompt
    Message = LongText,
    ImageSource = new BitmapImage(new Uri("../../media/c4f_26x26.png", UriKind.RelativeOrAbsolute)) { DecodePixelHeight = 50, DecodePixelWidth = 50 };
You could also alter the style, or I could add in a property for this as well.
Mar 11, 2013 at 10:39 AM
I am actually using this for windows phone 7... would you be able to add in a property in that version? It would really help me out :) If not, how do I alter the style so I can make the image smaller?

Thanks in advance
Mar 16, 2013 at 9:05 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 24, 2013 at 3:58 AM
feature added, will be part of the new release