locked
how scale imge object in windows store app?

    Question

  • i want to scale image with scale value is 0.9 in windows store app.
    Friday, March 28, 2014 6:53 AM

Answers

  • <Image>
      <Image.RenderTransform>
        <ScaleTransform ScaleX=".9" ScaleY=".9"/>
      </Image.RenderTransform>
    </Image>


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, March 28, 2014 12:24 PM
    Moderator
  • Hi,
    This is an indirect solution.

    you can put your image into a ViewBox and increase or decrease the width and height of the ViewBox.
    The ViewBox will scale the image without a distortion (Not everytime).

    <Viewbox Margin="583,284,431,169">
                <Image Source="Assets/SplashScreen.png"  />
            </Viewbox>

    Regards,


    Ibraheem Osama Mohamed | My Blog | @IbraheemOM | My Website

    (If my reply answers your question, please propose it as an answer)

    Friday, March 28, 2014 12:35 PM

All replies

  • <Image>
      <Image.RenderTransform>
        <ScaleTransform ScaleX=".9" ScaleY=".9"/>
      </Image.RenderTransform>
    </Image>


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, March 28, 2014 12:24 PM
    Moderator
  • Hi,
    This is an indirect solution.

    you can put your image into a ViewBox and increase or decrease the width and height of the ViewBox.
    The ViewBox will scale the image without a distortion (Not everytime).

    <Viewbox Margin="583,284,431,169">
                <Image Source="Assets/SplashScreen.png"  />
            </Viewbox>

    Regards,


    Ibraheem Osama Mohamed | My Blog | @IbraheemOM | My Website

    (If my reply answers your question, please propose it as an answer)

    Friday, March 28, 2014 12:35 PM
  • thanks

    Monday, March 31, 2014 4:17 AM