Skip to main content
Home Forums Silverlight Programming Programming with .NET - General ImageSource & MultiScaleSubImage
4 replies. Latest Post by j.chifu on January 10, 2009.
(0)
j.chifu
Member
15 points
8 Posts
01-09-2009 6:15 PM |
Hi,
I use a MultiScaleImage and my source is a collection. When i click on an image, i get the multiscalesubimage then i want display it in an Image Control.
img.Source = new BitmapImage( new Uri (mySubImage, UriKind.RelativeOrAbsolute)); i am getting error of course: can't convert multiscalesubimage to string
i am getting error of course: can't convert multiscalesubimage to string
can I convert my MultiScaleSubImage to ImageSource ?
or how can i get the source of a MultiScalesubImage ?
or an other ideas ... ?
swildermuth
Star
8320 points
1,546 Posts
01-10-2009 5:37 AM |
Unfortunatley the MultiScaleSubImage isn't an Image at all. Its an object to allow you to reorder and/or zoom to specific parts of a larger MultiscaleImage. You could determine this if you read the dzc file directly from the server and search it for the image data, but that's probably more work than you are expecting. A MultiScaleSubImage can't be used as the source of a BitmapImage. What are you trying to do with the SubImage?
01-10-2009 6:19 AM |
I have image named "imgSelected"
when I click a button I want to select an image from my List<MultiScaleSubImage> and to display in my "imgSelected"
Page.xaml---------------Annotation annotation = new Annotation();annotation.subImage = mySubImageSelected;this.Content = annotation;Annotation.xaml---------------public partial class Annotation : UserControl { public MultiScaleSubImage subImage { get; set; } public Annotation() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { imgSelected.Source = ..... } }
I hope I have been clear ...
01-10-2009 7:14 AM |
This isn't going to work, but you show a second MultiScaleImage instead of the image then use the sub image to zoom automatically (without any of the scroling behavior). It will look the same.
01-10-2009 7:37 AM |
Hi swildermuth,
i will try this
thanks for you help !