Skip to main content

Microsoft Silverlight

Answered Question ImageSource & MultiScaleSubImageRSS Feed

(0)

j.chifu
j.chifu

Member

Member

15 points

8 Posts

ImageSource & MultiScaleSubImage

 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


can I convert my MultiScaleSubImage to  ImageSource ?

or how can i get the source of a MultiScalesubImage ?

or an other ideas ... ? Stick out tongue

 

Chifu !
french student

swildermuth
swildermuth

Star

Star

8320 points

1,546 Posts

Re: ImageSource & MultiScaleSubImage

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?

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 3 Workshop
Miami, FL: Oct 12-14th
Portlant, OR: Dec 2-4th
Atlanta, GA: Dec 7-9th
http://silverlight-tour.com

j.chifu
j.chifu

Member

Member

15 points

8 Posts

Re: ImageSource & MultiScaleSubImage

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 ...

Chifu !
french student

swildermuth
swildermuth

Star

Star

8320 points

1,546 Posts

Answered Question

Re: Re: ImageSource &amp;amp; MultiScaleSubImage

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.

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 3 Workshop
Miami, FL: Oct 12-14th
Portlant, OR: Dec 2-4th
Atlanta, GA: Dec 7-9th
http://silverlight-tour.com

j.chifu
j.chifu

Member

Member

15 points

8 Posts

Re: Re: ImageSource &amp;amp; MultiScaleSubImage

 Hi swildermuth,

i will try this

thanks for you help ! Stick out tongue

Chifu !
french student
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities