Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

why can not set Canvas.TopProperty in usercontrol

$
0
0
 is not a valid value for property 'Top'.

public static UserControl1 getInstance()
        {
            if (instance == null)
                instance = new UserControl1();
            return instance;
        }


private void Label_MouseEnter(object sender, MouseEventArgs e)
        {
            //UserControl3.getInstance().SetValue(Canvas.LeftProperty, this.Width - 300);
            for (int i = 2; i < 100; i += 2)
            {
                UserControl3.getInstance().SetValue(Canvas.TopProperty, 300+i); // error here
            }
        }



No need to worry as many books are not the core and true story


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>