Border around image displayed in WpfAnnotationViewer

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

Moderator: Alex

Post Reply
gpbabu
Posts: 16
Joined: Wed Dec 14, 2016 9:01 pm

Border around image displayed in WpfAnnotationViewer

Post by gpbabu »

Hello Alex,

We are displaying a captured image centered in WpfAnnotationViewer with white background. These captured images have lot of white space. Is there anyway to set a border for the displayed image so that it is visually separated from the background.

Thanks
Babu

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

Re: Border around image displayed in WpfAnnotationViewer

Post by Alex »

Hello Babu,

You can set the border color in WPF image viewer using the WpfImageViewer.ImageBorderColor property:
https://www.vintasoft.com/docs/vsimagin ... Color.html

Border with can be set using the WpfImageViewer.ImageBorderWidth property:
https://www.vintasoft.com/docs/vsimagin ... Width.html

Best regards, Alexander

gpbabu
Posts: 16
Joined: Wed Dec 14, 2016 9:01 pm

Re: Border around image displayed in WpfAnnotationViewer

Post by gpbabu »

Hello Alex,

Thank you for the input. We were using 8.5 version. Now upgraded to 8.6 and have tried with the WpfAnnotationDemo application and couldn't see the image border. Do we need to make any other changes?

Regards
Babu

<vsai:WpfAnnotationViewer Grid.Row ="0" x:Name="annotationViewer"
Background="#FFEEEEEE" ImageBorderColor="Blue" ImageBorderWidth="4"
Width="Auto" Height="Auto" SizeMode="BestFit"
ZoomChanged="annotationViewer_ZoomChanged"
ImageLoadingProgress="annotationViewer_ImageLoadingProgress"
ImageLoading="annotationViewer_ImageLoading"
ImageLoaded="annotationViewer_ImageLoaded"
AnnotationInteractionModeChanged="annotationViewer_AnnotationInteractionModeChanged"
AnnotationTransformingStarted="annotationViewer_AnnotationTransformingStarted"
AnnotationTransformingFinished="annotationViewer_AnnotationTransformingFinished"
FocusedAnnotationViewChanged="annotationViewer_FocusedAnnotationViewChanged"
InputGestureCopy="{x:Null}"
InputGestureCut="{x:Null}"
InputGestureInsert="{x:Null}"
InputGestureDelete="{x:Null}"
PreviewKeyDown="annotationViewer_PreviewKeyDown"
RendererCacheSize="256">

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

Re: Border around image displayed in WpfAnnotationViewer

Post by Alex »

Hello Babu,

The WpfImageViewer.ImageBorderColor and WpfImageViewer.ImageBorderWidth properties are specifying the border color and width for not focused image. I think you are using image viewer in single page view mode and this is reason of your problem.

For adding the border to the image in single page view mode you need set the following properties:
  • UseImageAppearancesInSinglePageMode = True
  • FocusedImageBorderColor = Blue
  • FocusedImageBorderWidth = 4
Best regards, Alexander

gpbabu
Posts: 16
Joined: Wed Dec 14, 2016 9:01 pm

Re: Border around image displayed in WpfAnnotationViewer

Post by gpbabu »

Thanks Alex. It works with these settings.

Post Reply