Hi,
We were following the xambrowser code example for xamdialogwindow
Infragistics.Controls.Interactions.XamDialogWindow winMB; private void NoModalWindowMessageBox_Click(object sender, RoutedEventArgs e) { winMB = new Infragistics.Controls.Interactions.XamDialogWindow() { Width = 350, Height = 300, Header = DialogWindowStrings.XDW_ShowDialog_Prompt, StartupPosition = StartupPosition.Center }; Button ok = new Button() { Content = DialogWindowStrings.XDW_ShowDialog_ButtonOK, Width = 100, Height = 25 }; Button cancel = new Button() { Content = DialogWindowStrings.XDW_ShowDialog_ButtonCancel, Width = 100, Height = 25 }; ok.Click += new RoutedEventHandler(ok_Click); cancel.Click += new RoutedEventHandler(cancel_Click); StackPanel panel = new StackPanel(); panel.Orientation = Orientation.Horizontal; panel.Children.Add(ok); panel.Children.Add(cancel); panel.VerticalAlignment = VerticalAlignment.Bottom; panel.HorizontalAlignment = HorizontalAlignment.Center; panel.Margin = new Thickness(5); winMB.Content = panel; winMB.IsModal = true; winMB.StartupPosition = Infragistics.Controls.Interactions.StartupPosition.Center; this.windowContainer.Children.Add(winMB); } void cancel_Click(object sender, RoutedEventArgs e) { MessageBox.Show(DialogWindowStrings.XDW_MessageBox_Closed); this.winMB.Close(); } void ok_Click(object sender, RoutedEventArgs e) { MessageBox.Show(DialogWindowStrings.XDW_MessageBox_OK); this.winMB.Close(); }
We tried changing the this.windowContainer.Children.Add(winMB); to this.winMB.Show(), however, we found the dialog would not show in our application.
Is it possible to launch the window from the control just like we can do in Windows Forms MessageBox.Show()?
Thanks,
Jeff
Hello,
I used the code you provided and created a User Control which displayed the XamDialogWindow, I ran the sample and was able to successfully display the XamDialogWindow.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 10.2.20103.1013 in NetAdvantage for .NET 2010 Volume 3.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Valerie
Hello Jeff,
Were you able to resolve your issue?