This question is locked. New answers and comments are not allowed.
So I have a very simple UserControl...
<UserControl x:Class=".... my class ..."
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
Loaded="OnPageLoaded"
>
<Grid>
<telerik:RadWindow x:Name="cChooser"
Header="Choose Something"
Hidden="OnWindowHidden"
WindowStartupLocation="CenterParent"
WindowAnimation="OnShow"
ResizeMode="CanMinimize"
Background="{StaticResource GreyGradient}">
</telerik:RadWindow>
</Grid>
</UserControl>
--- code behind ---
/// <summary>
/// OnPageLoaded
/// </summary>
private void
OnPageLoaded(object sender, RoutedEventArgs e)
{
cChooser.ShowDialog();
}
Question 1:
RadWindow.Show() is correctly locating the window in the center of the surrounding grid. RadWindow.ShowDialog() places the window in the upper left hand corner of the containing UIElement (the grid). How can I get ShowDialog to locate the window correctly?
Question 2:
If I remove the surrounding grid the .Show will throw an error: 'Value does not fall within expected range...' (.ShowDialog works just as if there were a surrounding grid)
Thank you for your attention to this.