如何在WPF中更改画布的Canvas.Left属性内的Image? [英] How to change Image inside canvas's Canvas.Left property in WPF?
本文介绍了如何在WPF中更改画布的Canvas.Left属性内的Image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一个简单的问题,您的家伙. 我在Canvas中有一个图像,具有Canvas.Left属性,我想更改 以编程方式 我该怎么办?
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?
推荐答案
致电这是使用代码中附加属性的标准方法.在实现附加属性(例如Canvas.Left)时,通常会为名为PropertyName
的给定附加属性包括一个名为SetPropertyName
的静态方法.
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
.
这篇关于如何在WPF中更改画布的Canvas.Left属性内的Image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文