locked
ScaleUp Animation Problem RRS feed

  • Question

  • hello everyone,
    I have a textBox and I want to Make a check and error image for it when i check the textbox text.
    so i add two image into my project and set their width and height to 1 and i want to use animation to scale them up and i use this code :

            private void ScaleUpAnime(Image MyImg)
            {
                ScaleTransform ScaleUpTrans = new ScaleTransform(0, 0, 0, 0);
                MyImg.RenderTransform = ScaleUpTrans;
                DoubleAnimation ScaleUpAnime = new DoubleAnimation(1, 30, TimeSpan.FromMilliseconds(100));
                ScaleUpTrans.BeginAnimation(ScaleTransform.ScaleXProperty, ScaleUpAnime);
                ScaleUpTrans.BeginAnimation(ScaleTransform.ScaleYProperty, ScaleUpAnime);
            }

    but the problem is , when this animation run the position of the images will change and i dont want this ,
    could you help me to fix this problem please,

    in fact i want to scale them up in their position.
    Sunday, October 11, 2020 8:33 PM

All replies

  • Hi IKING251,

    Thank you for posting here.

    This problem seems to be closely related to WPF, so I suggest that you can ask this question in Microsoft Q&A.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 12, 2020 8:52 AM
  • i know but i dont get any answer so i decided to ask my question here too,

    thank you.

    Monday, October 12, 2020 10:19 AM
  • Hi Iking,

    I have noticed that someone is responding to the questions you posted on Microsoft Q&A, please keep follow of that.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 16, 2020 1:51 AM