Problem with modalWindow

2 posts, 1 answers
  1. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 14 Nov 2012 Link to this post

    Hello, I have got Window with modalWindow.
    I face issue.
    When I am opening the modal window and after clicking on iconApp on taskbar, modal window is disappears and I can't do anything with my app (only end app in task manager). See attached files

     


    I created the mainWindow by this way.
    <t:RadWindow
        xmlns:n="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
        n:RadWindowInteropHelper.ShowInTaskbar="True"   
        x:Class="SOme.Some.MainWindow"
        t:StyleManager.Theme="Metro"
        MinHeight="480" MinWidth="800" Height="650" Width="1024"
        WindowStartupLocation="CenterScreen"
        xmlns:vm="clr-namespace:someName">
     
    .....
    </t:RadWindow>
    in CS code I call method as

    var mainWindow = new MainWindow();
    mainWindow.Show();

    I created a modal window in exactly the same way.
    <t:RadWindow x:Class="Some.Some.SomeWindow"
                 xmlns:t="http://schemas.telerik.com/2008/xaml/presentation"
                 t:StyleManager.Theme="Metro"
                 WindowStartupLocation="CenterScreen"
                 CanMove="False"
                 CanClose="False"
                 ResizeMode="NoResize"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        ...
    </t:RadWindow>

    and call following method
    var mainWindow = new NewClientWindow();
    mainWindow.ShowDialog();

    I'm doing something wrong or this is a bug?
    Thank you.


    I use the following code to show the icon in the system tray (taskbar).
    xmlns:n="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
     
        n:RadWindowInteropHelper.ShowInTaskbar="True"
    Is there any best way?
  2. Answer
    Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 19 Nov 2012 Link to this post

    Hello Sergiy,

    Try setting Owner of the modal window. Just set his Owner to be the Window you are invoking the modal window from. This should help.

    All the best,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top