KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a bitmap object that is not a static resource. Normally, with image binding in WPF you can bind to a string path. However, I have a dynamically created bitmap object that I would like to bind to. Is it possible to do something like: <WrapPanel x:Name="imageWrapPanel" HorizontalAlignment="Center"> <Image Source="{Binding Material1}" Margin="10" /> <Image Source="/NightVision;component/Images/concrete_texture.tif" Margin="10" /> </WrapPanel> And in the code behind file I have a public accessor: public Bitmap Material1 { get { return new Bitmap(/* assume created somewhere else*/) } } The above is obviously not working however, is there a way to do something similar?
Tags (comma-separated)
Save Edits
Cancel