How to follow the location of an element in Silverlight -


I'm new to Silverlight Programming, and dependency property is still relatively new to me, Which causes the following problem:

I want to attach to an event, when canvas.LeftProperty for Canvas.TopProperty Changes occur with UIElement (one code in my UserControl ).

For example, I am able to:

  source .izeChanged + = delegate {target.Width = source.Width; Target.height = source.heat; };  

But I was unable to find a similar event for the place. Is this also possible?

"post-text" itemprop = "text">

Generally an element does not know about its location in the WPF layout system. The element (in your case, the canvas) is responsible for laying the element and the element is responsible for shaping itself according to the restrictions of container's layout only.

After saying this, you can use it on the element, the event is best to set it on the panel, and the layout updated event (according to the docs) always passes an empty reference to the sender parameter. This is because it is used as a trigger to scan the properties of children again.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -