/// <summary> /// Initializes a new instance of the ImageListView class. /// </summary> public ImageListView() { mColors = new ImageListViewColor(); SetRenderer(new ImageListViewRenderer()); AllowColumnClick = true; AllowColumnResize = true; AllowDrag = false; AllowDuplicateFileNames = false; AllowPaneResize = true; mBorderStyle = BorderStyle.Fixed3D; mCacheMode = CacheMode.OnDemand; mCacheLimitAsItemCount = 0; mCacheLimitAsMemory = 20 * 1024 * 1024; mColumns = new ImageListViewColumnHeaderCollection(this); ResourceManager manager = new ResourceManager("Manina.Windows.Forms.ImageListViewResources", Assembly.GetExecutingAssembly()); mDefaultImage = manager.GetObject("DefaultImage") as Image; mErrorImage = manager.GetObject("ErrorImage") as Image; HeaderFont = this.Font; mItems = new ImageListViewItemCollection(this); MultiSelect = true; mPaneWidth = 240; mRetryOnError = true; mSelectedItems = new ImageListViewSelectedItemCollection(this); mCheckedItems = new ImageListViewCheckedItemCollection(this); mSortColumn = ColumnType.Name; mSortOrder = SortOrder.None; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.Selectable | ControlStyles.UserMouse, true); ScrollBars = true; mShowCheckBoxes = false; mCheckBoxAlignment = ContentAlignment.BottomRight; mCheckBoxPadding = new Size(2, 2); mShowFileIcons = false; mIconAlignment = ContentAlignment.TopRight; mIconPadding = new Size(2, 2); Text = string.Empty; mThumbnailSize = new Size(96, 96); mUseEmbeddedThumbnails = UseEmbeddedThumbnails.Auto; mView = View.Thumbnails; mViewOffset = new Point(0, 0); hScrollBar = new HScrollBar(); vScrollBar = new VScrollBar(); hScrollBar.Visible = false; vScrollBar.Visible = false; hScrollBar.Scroll += new ScrollEventHandler(hScrollBar_Scroll); vScrollBar.Scroll += new ScrollEventHandler(vScrollBar_Scroll); layoutManager = new ImageListViewLayoutManager(this); forceRefresh = false; navigationManager = new ImageListViewNavigationManager(this); cacheManager = new ImageListViewCacheManager(this); itemCacheManager = new ImageListViewItemCacheManager(this); disposed = false; }
/// <summary> /// Initializes a new instance of the ImageListView class. /// </summary> public ImageListView() { SetRenderer(new ImageListViewRenderer()); AllowColumnClick = true; AllowColumnResize = true; AllowDrag = false; AllowDuplicateFileNames = false; AllowPaneResize = true; BackColor = SystemColors.Window; mBorderStyle = BorderStyle.Fixed3D; mCacheMode = CacheMode.OnDemand; mCacheLimitAsItemCount = 0; mCacheLimitAsMemory = 20 * 1024 * 1024; mColumns = new ImageListViewColumnHeaderCollection(this); mDefaultImage = ImageListViewResources.image; mErrorImage = ImageListViewResources.exclamation; HeaderFont = this.Font; mItems = new ImageListViewItemCollection(this); mPaneWidth = 240; mRetryOnError = true; mSelectedItems = new ImageListViewSelectedItemCollection(this); mSortColumn = ColumnType.Name; mSortOrder = SortOrder.None; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.Selectable | ControlStyles.UserMouse, true); Text = string.Empty; mThumbnailSize = new Size(96, 96); mUseEmbeddedThumbnails = UseEmbeddedThumbnails.Auto; mView = View.Thumbnails; mViewOffset = new Point(0, 0); hScrollBar = new HScrollBar(); vScrollBar = new VScrollBar(); hScrollBar.Visible = false; vScrollBar.Visible = false; hScrollBar.Scroll += new ScrollEventHandler(hScrollBar_Scroll); vScrollBar.Scroll += new ScrollEventHandler(vScrollBar_Scroll); layoutManager = new ImageListViewLayoutManager(this); forceRefresh = false; navigationManager = new ImageListViewNavigationManager(this); cacheManager = new ImageListViewCacheManager(this); itemCacheManager = new ImageListViewItemCacheManager(this); disposed = false; }