Set the AnnotationViewer's Current Image
Posted: 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.
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.