How to convert X/Y position to Canvas Left/Top properties when using ItemsControl?

The main problem with the code you presented is that the Canvas. Left and Canvas. Top properties are relative to a Canvas that is in the DataTemplate for the ItemsControl .

This keeps "resetting" the origin. Instead you can.

You can apply this conversion within a value converter in your binding. Value converters implement the IValueConverter interface (msdn.microsoft.com/en-us/library/system....). The problem is that your conversion requires both the X and Y component of your item.

A simple solution to this would be to bind to MyItem, rather than MyItem.WorldX. You can achieve this by using "Path=.", if you then create the following value converter ...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions