How to change Image inside canvas's Canvas.Left property in WPF?

家住魔仙堡 提交于 2019-12-24 15:00:57

问题


simple question for you fellas. I have an image inside a Canvas, with a Canvas.Left property i want to change programaticly. How do i do that?


回答1:


Call Canvas.SetLeft(theImage, newValue);

This is the standard means of using Attached Properties from Code. When implementing an attached property (such as Canvas.Left), it's standard to include a static method that is named SetPropertyName for a given attached property named PropertyName.



来源:https://stackoverflow.com/questions/9282796/how-to-change-image-inside-canvass-canvas-left-property-in-wpf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!