コード例 #1
0
		internal void Update(IFileDialogCustomize dialog)
		{
			Debug.Assert(dialog != null, "CommonFileDialogComboBox.Attach: dialog parameter can not be null");

			// Remove the control items.
			// Don't do RemoveAllControlItems. It's not implemented natively.
			for (int index = 0; index < oldCount; ++index)
				dialog.RemoveControlItem (Id, index);

			// Re-add the combo box items
			for (int index = 0; index < Items.Count; ++index) {
				string text = Items [index].Text;

				dialog.AddControlItem (Id, index, text);
			}

			// If we didn't, go select.
			if (Enabled) {
				SelectedIndex = 0;
				ApplyPropertyChange ("SelectedIndex");
			}

			oldCount = Items.Count;

			// Sync additional properties
			SyncUnmanagedProperties ();
		}
コード例 #2
0
        internal void Update(IFileDialogCustomize dialog)
        {
            Debug.Assert(dialog != null, "CommonFileDialogComboBox.Attach: dialog parameter can not be null");

            // Remove the control items.
            // Don't do RemoveAllControlItems. It's not implemented natively.
            for (int index = 0; index < oldCount; ++index)
            {
                dialog.RemoveControlItem(Id, index);
            }

            // Re-add the combo box items
            for (int index = 0; index < Items.Count; ++index)
            {
                string text = Items [index].Text;

                dialog.AddControlItem(Id, index, text);
            }

            // If we didn't, go select.
            if (Enabled)
            {
                SelectedIndex = 0;
                ApplyPropertyChange("SelectedIndex");
            }

            oldCount = Items.Count;

            // Sync additional properties
            SyncUnmanagedProperties();
        }