public FrameworkElement ResolveEditor(PropertyItem propertyItem) { AttachDebugger(); _propertyItem = propertyItem; _gridControl = new FilePropertyGridControl(); _gridControl.btnBrowse.Click += new RoutedEventHandler((object sender, RoutedEventArgs e) => { string filePath = ((SampleFileUserPrompt)_propertyItem.Instance).FilePath; System.Windows.Forms.OpenFileDialog opeFileDlg = new System.Windows.Forms.OpenFileDialog() { FileName = filePath, Multiselect = false }; if (opeFileDlg.ShowDialog(new Win32WindowWrapper(WpfWindowHelper.GetParentWindowHandle((UIElement)sender))) == System.Windows.Forms.DialogResult.OK) { ((SampleFileUserPrompt)_propertyItem.Instance).FilePath = opeFileDlg.FileName; } RefreshTextField(); }); RefreshTextField(); return(_gridControl); }
private void WinRetrieveWebCreatedHandler(object sender, EventArgs e) { ExcelWvvm.WinRetrieveWeb win = sender as ExcelWvvm.WinRetrieveWeb; if (win != null) { WpfWindowHelper.SetOwnerToExcel(win); win.Left = 300; win.Top = 300; } }
public void GoogleHistoryClick(IRibbonControl control) { WpfWindowHelper.ShowWindow <ExcelWvvm.WinGoogleHistory>(null); }
public void FunctionsClick(IRibbonControl control) { WpfWindowHelper.ShowWindow <ExcelWvvm.WinRetrieveWeb>(WinRetrieveWebCreatedHandler); }