1. Add a RadPopupEditor on the form and put two RadButtons in its container.
2. Add a RadOpenFileDialog and a MS OpenFileDialog.
3. Use the following code snippet:
public RadForm1()
{
InitializeComponent();
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radOpenFileDialog1.InitialDirectory = @"C:\";
this.radOpenFileDialog1.FileName = string.Empty;
if (this.radOpenFileDialog1.ShowDialog() == DialogResult.OK)
{
string fileName = this.radOpenFileDialog1.FileName;
if (this.radOpenFileDialog1.SafeFileNames.ToList().Count() > 0)
{
fileName = this.radOpenFileDialog1.SafeFileNames.First();
}
this.Text = fileName;
}
}
private void radButton2_Click(object sender, EventArgs e)
{
this.openFileDialog1.InitialDirectory = @"C:\";
this.openFileDialog1.FileName = string.Empty;
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
string fileName = this.radOpenFileDialog1.FileName;
if (this.openFileDialog1.SafeFileNames.ToList().Count() > 0)
{
fileName = this.openFileDialog1.SafeFileNames.First();
}
this.Text = fileName;
}
}
Expected: MS OpenFileDialog is top most:
Actual: RadOpenFileDialog is beneath the popup container:
Workaround:
this.radOpenFileDialog1.OpenFileDialogForm.TopMost = true;