Example #1
0
 void OnGetParentPath(object sender, RoutedEventArgs e)
 {
     if (!FileSystemCollection.LastPath.IsNull() && FileSystemCollection.LastPath.DirectoryExists())
     {
         FileSystemCollection.Set(FileSystemCollection.LastPath.GetDirectoryName());
     }
 }
Example #2
0
 void OnMouseDoubleClick(object sender, RoutedEventArgs e)
 {
     if (sender.As <FrameworkElement>()?.Tag != null)
     {
         var Path = (sender as FrameworkElement).Tag.ToString();
         if (Path.DirectoryExists())
         {
             FileSystemCollection.Set(Path);
         }
     }
 }
Example #3
0
        public MainWindow()
        {
            InitializeComponent();

            //AlignableWrapPanel
            for (int i = 1; i <= 84; i++)
            {
                PART_AlignableWrapPanel.Children.Add(new Button()
                {
                    Content = "Button {0}".F(i)
                });
            }

            //AdvancedComboBox
            HierarchialCollection = new ObservableCollection <HierarchialObject>();
            for (int i = 0; i < 10; i++)
            {
                var k = new HierarchialObject("Object " + i);
                for (int j = 0; j < 5; j++)
                {
                    var m = new HierarchialObject("Object " + (i + j));
                    m.Items.Add(new HierarchialObject("Object " + i + "a"));
                    k.Items.Add(m);
                }
                HierarchialCollection.Add(k);
            }

            //DataGrid/ListView/TabbedTree
            FileSystemCollection = new FileSystemCollection();
            foreach (var i in System.IO.Directory.GetLogicalDrives())
            {
                FileSystemCollection.Add(new FileSystemEntryModel(i));
            }

            //ListView
            FileSystemCollectionView = new ListCollectionView(FileSystemCollection);

            //PropertyGrid
            PropertyGridSource = new ObservableCollection <WildObject>();
            for (var i = 0; i < 5; i++)
            {
                PropertyGridSource.Add(new WildObject("Wild Object " + i));
            }
        }