本文整理汇总了C#中Sce.Atf.Controls.TreeControl.ExpandAll方法的典型用法代码示例。如果您正苦于以下问题:C# TreeControl.ExpandAll方法的具体用法?C# TreeControl.ExpandAll怎么用?C# TreeControl.ExpandAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sce.Atf.Controls.TreeControl
的用法示例。
在下文中一共展示了TreeControl.ExpandAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SettingsDialog
/// <summary>
/// Constructor</summary>
/// <param name="settingsService">Settings service</param>
/// <param name="dialogOwner">Dialog owner window HWND</param>
/// <param name="pathName">Path of settings to display initially, or null</param>
public SettingsDialog(SettingsService settingsService, IWin32Window dialogOwner, string pathName)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
SplitterRatio = 0.33f;
m_settingsService = settingsService;
m_dialogOwner = dialogOwner;
m_originalState = m_settingsService.UserState; // for cancel
m_treeControl = new TreeControl(TreeControl.Style.SimpleTree);
m_treeControl.Dock = DockStyle.Fill;
m_treeControl.SelectionMode = SelectionMode.One;
m_treeControl.ShowRoot = false;
m_treeControl.ImageList = ResourceUtil.GetImageList16();
m_treeControl.ExpandAll();
m_treeControl.NodeSelectedChanged += treeControl_NodeSelectedChanged;
m_treeControlAdapter = new TreeControlAdapter(m_treeControl);
m_treeControlAdapter.TreeView = settingsService.UserSettings;
treePanel.Controls.Add(m_treeControl);
m_propertyGrid = new Sce.Atf.Controls.PropertyEditing.PropertyGrid();
m_propertyGrid.Dock = DockStyle.Fill;
propertiesPanel.Controls.Add(m_propertyGrid);
// select an initial node so something is displayed in the PropertyGrid
TreeControl.Node firstNode = null;
if (pathName != null)
firstNode = m_treeControlAdapter.ExpandPath(m_settingsService.GetSettingsPath(pathName));
if (firstNode == null) // in case pathName is not null, but ExpandPath returns null
firstNode = m_treeControl.ExpandToFirstLeaf();
firstNode.Selected = true;
ShowProperties(m_settingsService.GetProperties((Tree<object>)firstNode.Tag)); //does auto-setting of column widths
defaultsButton.Click += DefaultsButton_Click;
}