Click here to Skip to main content
15,885,910 members
Articles / Desktop Programming / Windows Forms

Crystal Image Toolkit: thumbnail image control and picture viewing.

Rate me:
Please Sign up or sign in to vote.
4.68/5 (21 votes)
11 May 2011LGPL37 min read 109.6K   8.3K   95  
Thumbnail and image viewing controls for Windows Forms, using C#.
namespace BorderSplitModeDemo
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Attilan.Crystal.Controls.CrystalDesignCollector crystalDesignCollector1 = new Attilan.Crystal.Controls.CrystalDesignCollector();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.openFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.crystalImageGridView1 = new Attilan.Crystal.Controls.CrystalImageGridView();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // menuStrip1
            // 
            this.menuStrip1.Font = new System.Drawing.Font("Segoe UI", 9F);
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(604, 24);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // fileToolStripMenuItem
            // 
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.openFolderToolStripMenuItem,
            this.exitToolStripMenuItem});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
            this.fileToolStripMenuItem.Text = "File";
            // 
            // openFolderToolStripMenuItem
            // 
            this.openFolderToolStripMenuItem.Name = "openFolderToolStripMenuItem";
            this.openFolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.openFolderToolStripMenuItem.Text = "Open Folder";
            this.openFolderToolStripMenuItem.Click += new System.EventHandler(this.openFolderToolStripMenuItem_Click);
            // 
            // crystalImageGridView1
            // 
            this.crystalImageGridView1.AlphaBlendValue = 150;
            this.crystalImageGridView1.AutoScroll = true;
            this.crystalImageGridView1.AutoScrollMinSize = new System.Drawing.Size(520, 1125);
            this.crystalImageGridView1.BorderSplitMode = true;
            this.crystalImageGridView1.BorderWidth = 6;
            this.crystalImageGridView1.CellBorderColor = System.Drawing.Color.Transparent;
            this.crystalImageGridView1.CellMargin = 10;
            this.crystalImageGridView1.CellSelectedTextColor = System.Drawing.Color.White;
            this.crystalImageGridView1.CellSize = new System.Drawing.Size(130, 130);
            this.crystalImageGridView1.CellSplitColor = System.Drawing.Color.Black;
            this.crystalImageGridView1.CellTextColor = System.Drawing.Color.Black;
            this.crystalImageGridView1.Color1 = System.Drawing.Color.LightBlue;
            this.crystalImageGridView1.Color2 = System.Drawing.Color.SteelBlue;
            this.crystalImageGridView1.ColorAngle = 360F;
            this.crystalImageGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
            crystalDesignCollector1.ImageFilter = null;
            crystalDesignCollector1.ImageLocation = null;
            crystalDesignCollector1.PersistThumbnails = true;
            crystalDesignCollector1.Thumbnailer = null;
            this.crystalImageGridView1.GridController = crystalDesignCollector1;
            this.crystalImageGridView1.GridImages = 20;
            this.crystalImageGridView1.GridMargin = 5;
            this.crystalImageGridView1.Location = new System.Drawing.Point(0, 24);
            this.crystalImageGridView1.Name = "crystalImageGridView1";
            this.crystalImageGridView1.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.crystalImageGridView1.ShowText = true;
            this.crystalImageGridView1.Size = new System.Drawing.Size(604, 420);
            this.crystalImageGridView1.TabIndex = 1;
            this.crystalImageGridView1.Text = "crystalImageGridView1";
            this.crystalImageGridView1.TextHeight = 18;
            this.crystalImageGridView1.TextMargin = 2;
            this.crystalImageGridView1.UseAlphaBlending = false;
            // 
            // exitToolStripMenuItem
            // 
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.exitToolStripMenuItem.Text = "Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(604, 444);
            this.Controls.Add(this.crystalImageGridView1);
            this.Controls.Add(this.menuStrip1);
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "Form1";
            this.Text = "CrystalImageGridView - BorderSplitMode Demo";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem openFolderToolStripMenuItem;
        private Attilan.Crystal.Controls.CrystalImageGridView crystalImageGridView1;
        private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer (Senior)
United States United States
Richard has been working with Windows software since 1991. He has worked for Borland, Microsoft, Oracle, and various startup companies such as Livescribe. Currently he is developing projects in C#, Windows Forms, and Net Framework. Visit his blog Attilan (www.attilan.com) to learn more about his tools, projects and discoveries.

Comments and Discussions