Calculate relative position in Code Behind WPF

How can I calculate relative position of my elements (Lift, LArmPosition, PArmPosition) in code behind, where their position depends on the Canvas Width(X) and Height(Y) and the Width(X) and Height(Y) from other/same elements(Lift, LArmPosition, PArmPosition, Rectanngle). I have absolute values now, for example max (570) and min (80), which are hard coded, for moving my… Read More Calculate relative position in Code Behind WPF