Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.Win32.OpenFileDialog dialog = new System.Win32.OpenFileDialog();
- dialog.AddExtension = true;
- dialog.CheckPathExists = true;
- dialog.DefaultExt = ".xaml";
- dialog.Filter = "Xaml files (.xaml)|*xaml|All files|*.*";
- dialog.FilterIndex = 0;
- Boolean? result = dialog.ShowDialog();
- if (result.HasValue && result.Value)
- {
- // business logic
- }
- Filter = "Xaml files (.xaml)|*xaml|All files|*.*",
- Filter = "Xaml files (.xaml)|*.xaml|All files|*.*",
- System.Win32.OpenFileDialog dialog = new System.Win32.OpenFileDialog()
- {
- AddExtension = true,
- CheckPathExists = true,
- DefaultExt = ".xaml",
- Filter = "Xaml files (.xaml)|*xaml|All files|*.*",
- FilterIndex = 0
- };
- private void FileOpen()
- {
- Boolean? result = dialog.ShowDialog();
- if (result.HasValue && result.Value)
- {
- // business logic
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement