Our last post before the new year and some new material is an update to the ImageBox
(now at version 1.1.2.0) and TabList
(at version 1.0.0.2) controls. You can grab the updated source from the links at the end of the post, or from the GitHub page.
ImageBox
Changes and new features
- Added
IsPointInImage
method. This function returns if a given point is within the image viewport, and is useful for combining withPointToImage
. - Added
ImageBorderColor
property, allowing you to customize the color of the image border - Added a new
ImageBoxBorderStyle
,FixedSingleGlowShadow
. This style allows for a more smoother outer glow shadow instead of the existing clunky drop shadow. - Added
ShowPixelGrid
andPixelGridColor
properties. When set, a dotted grid is displayed around pixels when zooming in on an image. - Added new overload to
PointToImage
which allows you to specify if the function should map the given point to the nearest available edge(s) if the point is outside the image boundaries - Added
AllowDoubleClick
property. When set, the normal double click events and overrides work as expected. - Added
VirtualMode
andVirtualSize
properties. These new properties allow you to use all functionality of the ImageBox control without having to set theImage
property. You can also use the newVirtualDraw
event to provide custom drawing without having to override existing drawing functionality. - Additional documentation added via XML comments
Fixed
- If the
GridDisplayMode
property is set toImage
an explicit image border is no longer drawn, instead theImageBorder
property is correctly honoured. - Fixes a problem where half the pixels of the first row/column were lost when zooming. Thanks to Rotem for the fix.
- The
GetImageViewport
method now correctly returns a width and height that accounts for control size, padding and zoom levels. - Fixed incorrect attributes on
AutoSize
property - Fixed the image viewport sometimes being the incorrect size when zoomed in. Thanks to WMJ for the fix.
- Fixes "see also" documentation errors for events
TabList
Changes and new features
- Added
ShowTabList
property. When set toFalse
, the list of tabs is no longer displayed, and navigation can only occur via code. - Added
AllowTabSelection
property. When set toFalse
, the control can no longer gain focus, mouse hover effects are not displayed, and navigation can only occur via code. This allows you to disable navigation whilst still having the tabs visible.
Fixed
- Fixed the
HoverIndex
property always defaulting to zero.
Happy New Year all!
Downloads
- Cyotek.Windows.Forms.ImageBox.zip (1.62 MB)
- Cyotek.Windows.Forms.TabList.zip (152.27 KB)
All content Copyright © by Cyotek Ltd or its respective writers. Permission to reproduce news and web log entries and other RSS feed content in unmodified form without notice is granted provided they are not used to endorse or promote any products or opinions (other than what was expressed by the author) and without taking them out of context. Written permission from the copyright owner must be obtained for everything else.
Original URL of this content is http://www.cyotek.com/blog/imagebox-and-tablist-updates-virtual-mode-pixel-grid-bug-fixes-and-more?source=rss