i created a class "Component", which will be added to the children of my canvas. After the adding, i want to position these components using for example:
comp.setValue(Canvas.LeftProperty, 100d);
which works fine. After that the component will be added to canvas. Now my actual problem is to get the components actual width. I tried these things like
comp.Width;
comp.ActualWidth;
but they are 0 or NaN. In my understanding, this should be like that. Cause they have been added to the canvas, and should than obtain there specific sizes, or am i wrong with this?
Also, i added an OnClick-Event on those components, in which they write their ActualWidth on the console, and it works. But i want to get these informations directly after adding them..
Any ideas?
Greetings and stuff!