ImageViewer 图片视图

ImageViewerImageBrowser 的核心构件,它可以作为独立的控件使用,无需弹窗。

1
2
3
4
5
6
[TemplatePart(Name = ElementPanelMain, Type = typeof(Panel))]
[TemplatePart(Name = ElementCanvasSmallImg, Type = typeof(Canvas))]
[TemplatePart(Name = ElementBorderMove, Type = typeof(Border))]
[TemplatePart(Name = ElementBorderBottom, Type = typeof(Border))]
[TemplatePart(Name = ElementImageMain, Type = typeof(Image))]
public class ImageViewer : Control

属性

属性 描述 默认值 备注
ShowImgMap 是否显示小地图 false
ImageSource 图片资源
IsFullScreen 是否处于全屏显示中 false

案例

1
<hc:ImageViewer Background="{DynamicResource SecondaryRegionBrush}" Width="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>

ImageViewer