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
Border around image displayed in WpfAnnotationViewer
Moderator: Alex
-
- Posts: 16
- Joined: Wed Dec 14, 2016 9:01 pm
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Border around image displayed in WpfAnnotationViewer
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
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
-
- Posts: 16
- Joined: Wed Dec 14, 2016 9:01 pm
Re: Border around image displayed in WpfAnnotationViewer
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">
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">
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Border around image displayed in WpfAnnotationViewer
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:
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
-
- Posts: 16
- Joined: Wed Dec 14, 2016 9:01 pm
Re: Border around image displayed in WpfAnnotationViewer
Thanks Alex. It works with these settings.