开发者

how Image Binding Dynamically WPF?

开发者 https://www.devze.com 2023-02-24 16:26 出处:网络
i need to bind an image on run time in code behind thing is it\'s for WPF user control ho开发者_StackOverflow社区w can i do it? think i\'m totally new to WPF and please explain how to do it appreciate

i need to bind an image on run time in code behind thing is it's for WPF user control ho开发者_StackOverflow社区w can i do it? think i'm totally new to WPF and please explain how to do it appreciate your reply. thanks


You can easily create binding in code : How to: Create a Binding in Codee

But it can be problematic form Image control, because Source property requires ImageSource type, but in XAML, you usualy specify URI itself and XAML will convert it apropriately. See more here : WPF Image UriSource and Data Binding

If you dont understand something, please edit your question.

0

精彩评论

暂无评论...
验证码 换一张
取 消