packages/Windows API Code Pack 1.1/source/Samples/Shell/CommonFileDialogsDemo/CS/CommonFileDialogsDemo/Form1.cs
/// <summary>
/// Load all the knownfolders into the combobox
/// </summary>
Load all the knownfolders into the combobox
Load all the knownfolders into the combobox
private void LoadKnownFolders()
        {
            knownFoldersComboBox.Items.Clear();
            foreach (IKnownFolder kf in KnownFolders.All)
                if (kf != null && kf.CanonicalName != null)
                    knownFoldersComboBox.Items.Add(kf.CanonicalName);
            if (knownFoldersComboBox.Items.Count > 0)
                knownFoldersComboBox.SelectedIndex = 0;
        }
private void LoadKnownFolders ( ) { knownFoldersComboBox . Items . Clear ( ) ; foreach ( IKnownFolder kf in KnownFolders . All ) if ( kf != null && kf . CanonicalName != null ) knownFoldersComboBox . Items . Add ( kf . CanonicalName ) ; if ( knownFoldersComboBox . Items . Count > 0 ) knownFoldersComboBox . SelectedIndex = 0 ; }
Load all the knownfolders into the combobox
Load all the knownfolders into the combobox
// Make sure we are clear // Get a list of all the known folders // Set our initial selection