public Form1()
        {
            InitializeComponent();

            SnapFieldListTreeView treeView = fieldListDockPanel1.Controls[0].Controls[0] as SnapFieldListTreeView;

            // Customize the context menu.
            MenuCommandHandler menuCommandHandler = new MyMenuCommandHandler(snapControl1);

            menuCommandHandler.RegisterMenuCommands();
            snapControl1.ReplaceService <MenuCommandHandler>(menuCommandHandler);

            // Remove the Parameters node.
            IDataSourceCollectorService  oldService = snapControl1.GetService <IDataSourceCollectorService>();
            MyDataSourceCollectorService newService = new MyDataSourceCollectorService(oldService);

            snapControl1.ReplaceService <IDataSourceCollectorService>(newService);
            SnapFieldListTreeView view = fieldListDockPanel1.Controls[0].Controls[0] as SnapFieldListTreeView;

            view.AllowSvgImages = false;
            view.UpdateDataSource(snapControl1, newService.GetDataSources());

            #region #FieldListDockPanel_Options
            // Retain the original field order in the tree.
            fieldListDockPanel1.SortOrder = SortOrder.None;
            // Display nested fields at the bottom.
            fieldListDockPanel1.ShowComplexProperties = DevExpress.XtraReports.Design.ShowComplexProperties.Last;
            // Specify the Data Explorer window caption.
            fieldListDockPanel1.Text = "My Data";
            #endregion #FieldListDockPanel_Options
        }
 public CustomMenuCommandHandler(SnapControl snap, SnapFieldListTreeView tree) : base(snap)
 {
     snapControl = snap;
     treeView    = tree;
 }