packages/Windows API Code Pack 1.1/source/Samples/Shell/ShellThumbnailBrowserDemo/CS/ThumbnailBrowserDemo/ThumbnailBrowser.cs
/// <summary>
/// Toggle the different views for the thumbnail image.
/// Includes: Small, Medium, Large (default), and Extra Large.
/// </summary>
Toggle the different views for the thumbnail image.
Includes: Small, Medium, Large (default), and Extra Large.
Toggle the different views for the thumbnail image . Includes : Small Medium Large ( default ) and Extra Large .
private void ToggleViews()
        {
            if (currentView == Views.Small)
            {
                currentView = Views.Medium;
                toolStripSplitButton1.Image = Microsoft.WindowsAPICodePack.Samples.ThumbnailBrowserDemo.Properties.Resources.medium;
                smallToolStripMenuItem.Checked = false;
                mediumToolStripMenuItem.Checked = true;
                largeToolStripMenuItem.Checked = false;
                extraLargeToolStripMenuItem.Checked = false;
            }
            else if (currentView == Views.Medium)
            {
                currentView = Views.Large;
                toolStripSplitButton1.Image = Microsoft.WindowsAPICodePack.Samples.ThumbnailBrowserDemo.Properties.Resources.large;
                smallToolStripMenuItem.Checked = false;
                mediumToolStripMenuItem.Checked = false;
                largeToolStripMenuItem.Checked = true;
                extraLargeToolStripMenuItem.Checked = false;
            }
            else if (currentView == Views.Large)
            {
                currentView = Views.ExtraLarge;
                toolStripSplitButton1.Image = Microsoft.WindowsAPICodePack.Samples.ThumbnailBrowserDemo.Properties.Resources.extralarge;
                smallToolStripMenuItem.Checked = false;
                mediumToolStripMenuItem.Checked = false;
                largeToolStripMenuItem.Checked = false;
                extraLargeToolStripMenuItem.Checked = true;
            }
            else if (currentView == Views.ExtraLarge)
            {
                currentView = Views.Small;
                toolStripSplitButton1.Image = Microsoft.WindowsAPICodePack.Samples.ThumbnailBrowserDemo.Properties.Resources.small;
                smallToolStripMenuItem.Checked = true;
                mediumToolStripMenuItem.Checked = false;
                largeToolStripMenuItem.Checked = false;
                extraLargeToolStripMenuItem.Checked = false;
            }
            UpdatePreview();
        }
private void ToggleViews ( ) { if ( currentView == Views . Small ) { currentView = Views . Medium ; toolStripSplitButton1 . Image = Microsoft . WindowsAPICodePack . Samples . ThumbnailBrowserDemo . Properties . Resources . medium ; smallToolStripMenuItem . Checked = false ; mediumToolStripMenuItem . Checked = true ; largeToolStripMenuItem . Checked = false ; extraLargeToolStripMenuItem . Checked = false ; } else if ( currentView == Views . Medium ) { currentView = Views . Large ; toolStripSplitButton1 . Image = Microsoft . WindowsAPICodePack . Samples . ThumbnailBrowserDemo . Properties . Resources . large ; smallToolStripMenuItem . Checked = false ; mediumToolStripMenuItem . Checked = false ; largeToolStripMenuItem . Checked = true ; extraLargeToolStripMenuItem . Checked = false ; } else if ( currentView == Views . Large ) { currentView = Views . ExtraLarge ; toolStripSplitButton1 . Image = Microsoft . WindowsAPICodePack . Samples . ThumbnailBrowserDemo . Properties . Resources . extralarge ; smallToolStripMenuItem . Checked = false ; mediumToolStripMenuItem . Checked = false ; largeToolStripMenuItem . Checked = false ; extraLargeToolStripMenuItem . Checked = true ; } else if ( currentView == Views . ExtraLarge ) { currentView = Views . Small ; toolStripSplitButton1 . Image = Microsoft . WindowsAPICodePack . Samples . ThumbnailBrowserDemo . Properties . Resources . small ; smallToolStripMenuItem . Checked = true ; mediumToolStripMenuItem . Checked = false ; largeToolStripMenuItem . Checked = false ; extraLargeToolStripMenuItem . Checked = false ; } UpdatePreview ( ) ; }
Toggle the different views for the thumbnail image.
Toggle the different views for the thumbnail image .
// Toggle the views // Update our current view, as well as the image shown // on the "Views" menu. // Update the image