Click here to Skip to main content
15,909,827 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the Image from the Image Control in WPF

eg. int i =10 ;
means variable i has value 10
XML
<Image x:Name="imageViewer" Source= SomePath>


now what is/how to get the value or image imageviewer programatically?
Please help me through this


Thanks Christian Graus for your response
Actually I want to fetch the content of Image and assign it to some other variable.
Posted
Updated 27-Jan-10 22:19pm
v4

1 solution

ImageSource sc = imageViewer.Source;

I'm not sure what your example for int i = 10 means, except that you're saying you want to assign a variable to the image from an Image control, is that right ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900