private void btnCreateNewPanel_Click(object sender, RoutedEventArgs e) { DirPanel dpContext = new DirPanel(@"\\"); var panel = new DirectoryPanel(dpContext); panel.ClosingRequested += new DirectoryPanelNeedClosing(panel_ClosingIsRequested); mainPanel.Children.Add(panel); //bind newly created control height property to actualheight property of master stackpanel Binding b = new Binding("ActualHeight") {Source = mainPanel}; panel.SetBinding(FrameworkElement.HeightProperty, b); }
void panel_ClosingIsRequested(DirectoryPanel instance) { mainPanel.Children.Remove(instance); }
public ExtensionFilter(DirectoryPanel panelref, bool subcurs, string filter, SearchOption sop) : this() { fileFilter = filter; PanelRef = panelref; subcursive = subcurs; so = sop; }