Set the AnnotationViewer's Current Image

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
Junhui
Posts: 8
Joined: Wed Jan 18, 2012 10:22 am

Set the AnnotationViewer's Current Image

Post by Junhui » Thu Feb 09, 2012 8:59 am

Hello, Alex. I have a problem with AnnotationViewer.
I got the image files from DB, and maked them to VintasoftImages, and added to annotationViewer's ImageCollection.
My Codes are below,
foreach(...)
{
...
VintasoftImage img = new VintasoftImage(mstream);
annotationViewer1.Images.Add(img);
...
}

After that, I inserted image file to annotationViewer's ImageCollection.
My Codes are below,
{
VintasoftImage img = new VintasoftImage(_sourceStream);
annotationViewer1.Images.Insert(0, img); //not add(), want to insert at the top.
}

When I run my code, _sourceStream image inserted ordinarily at the top of my AnnotatedThumbnailViewer.
But annotationViewer1's image doesn't change to the inserted image.
I want to change image not only AnnotatedThumbnailViewer but also AnnotationViewer when I inserted image.
I tried these codes below but they didn't work.
{
VintasoftImage img = new VintasoftImage(_sourceStream);
annotationViewer1.Images.Insert(0, img);
annotationViewer1.FocusedIndex = 0;
}
or...
{
VintasoftImage img = new VintasoftImage(_sourceStream);
annotationViewer1.Images.Insert(0, img);
annotationViewer1.Refresh();
}
or...
VintasoftImage img = new VintasoftImage(_sourceStream);
annotationViewer1.Images.Insert(0, img);
annotationViewer1.Images[0].SetImage(new VintasoftImage(_sourceStream));
}
they all didn't work properly.
I want your some advice to handle this problem.

Best Regards,
Jun-Hee.

Junhui
Posts: 8
Joined: Wed Jan 18, 2012 10:22 am

Re: Set the AnnotationViewer's Current Image

Post by Junhui » Thu Feb 09, 2012 9:48 am

I know when I use Add(), can change current image of annotationViewer1's image properly.
Like codes below,
{
...
annotationViewer1.Images.Add(_sourceStream);
annotationViewer1.FocusedIndex = annotationViewer1.Images.Count - 1;
...
}

But I want to "Insert" image at the top of the annotatedThumbnailViewer,
so I inserted image at ImageCollection's 0 index.
{
annotationViewer1.Images.Insert(0, img);
annotationViewer1.FocusedIndex = 0;
}
They didn't work properly.(annotationViewer's image doesn't change) So I need your some advice.

Best Regard,
Jun-Hee.

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: Set the AnnotationViewer's Current Image

Post by Alex » Fri Feb 10, 2012 5:01 pm

Hello Jun-Hee,

Thank you for your message and good description of the problem, we have fixed the problem in version 5.0.5.1 of VintaSoftImaging.NET SDK.

Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest