Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. System.Win32.OpenFileDialog dialog = new System.Win32.OpenFileDialog();
  2. dialog.AddExtension = true;
  3. dialog.CheckPathExists = true;
  4. dialog.DefaultExt = ".xaml";
  5. dialog.Filter = "Xaml files (.xaml)|*xaml|All files|*.*";
  6. dialog.FilterIndex = 0;
  7.  
  8. Boolean? result = dialog.ShowDialog();
  9. if (result.HasValue && result.Value)
  10. {
  11. // business logic
  12. }
  13.  
  14. Filter = "Xaml files (.xaml)|*xaml|All files|*.*",
  15.  
  16. Filter = "Xaml files (.xaml)|*.xaml|All files|*.*",
  17.  
  18. System.Win32.OpenFileDialog dialog = new System.Win32.OpenFileDialog()
  19. {
  20. AddExtension = true,
  21. CheckPathExists = true,
  22. DefaultExt = ".xaml",
  23. Filter = "Xaml files (.xaml)|*xaml|All files|*.*",
  24. FilterIndex = 0
  25. };
  26.  
  27. private void FileOpen()
  28. {
  29. Boolean? result = dialog.ShowDialog();
  30. if (result.HasValue && result.Value)
  31. {
  32. // business logic
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement