You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use data binding with a user control to move the control that is placed on a canvas. The data binding for the Canvas.Left property doesn't seem to work, but when tied to the Width property it works fine.
If you click and drag the left hand side of the blue square, you should be able to move it left or right ( doesn't seem to work )
If you click and drag the right hand side of the square, it should increase its width ( works correctly )
There is also some commented out code in the CustomRectangle.xaml.cs in the method CustomRectangle_PointerMoved that instead of updating the variable, will use SetValue instead. That works, but the effect is very jerky and seems to jump around.
Does anyone know if this is a bug, or if this is incorrect, the proper way to make this work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use data binding with a user control to move the control that is placed on a canvas. The data binding for the Canvas.Left property doesn't seem to work, but when tied to the Width property it works fine.
I have created an example in the following repo: https://github.com/onslauth/CanvasDataBinding
The example should work as follows:
There is also some commented out code in the
CustomRectangle.xaml.cs
in the methodCustomRectangle_PointerMoved
that instead of updating the variable, will use SetValue instead. That works, but the effect is very jerky and seems to jump around.Does anyone know if this is a bug, or if this is incorrect, the proper way to make this work?
Beta Was this translation helpful? Give feedback.
All reactions