RadWindow Size and Opened Doesn't Work Anymore

6 posts, 0 answers
  1. Jeff
    Jeff avatar
    28 posts
    Member since:
    Aug 2010

    Posted 18 Dec 2011 Link to this post

    I updated my dlls to Q2 2011 from Q1 2011. My DialogParameters.Opened handler for RadWindow.Prompt/Alert/Confirm doesn't get fired after upgrading.

    Also, I previously had a RadWindow.Alert that was passing in a StackPanel with a RadExpander. The RadExpander doesn't resize the window anymore, like it used to...it just expands down below the visible area of my alert window.
    const string message = "We're sorry, an error has occurred. Please report this to your support representative.";
    var errorTextBox = new TextBox
    {
        IsReadOnly = true,
        Text = exception.ToString(),
        TextWrapping = TextWrapping.Wrap,
        TextAlignment = TextAlignment.Left,
        VerticalContentAlignment = VerticalAlignment.Top,
        MaxWidth = 360,
        Height = 150
    };
     
    errorTextBox.MouseDoubleClick += delegate { errorTextBox.SelectAll(); };
     
    var panel = new StackPanel();
    panel.Children.Add(new TextBlock { Text = message, Padding = new Thickness(0, 0, 0, 12), TextWrapping = TextWrapping.Wrap });
    panel.Children.Add(new RadExpander { Content = errorTextBox, Header = "Details..." });
    var dialogParameters = new DialogParameters
    {
        Owner = owner,
        Header = "An error has occurred",
        Content = new ContentControl { MaxWidth = 400, MinHeight = 80, Content = panel },
        Opened = (sender, e) => ((ContentControl)sender).Focus()
    };
     
    RadWindow.Alert(dialogParameters);

    Why have all these things stopped working? I upgraded to Q2 from Q1 because of a different bug in the lazy loading of a RadTreeView...but now I guess I need to go back to Q1?
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 21 Dec 2011 Link to this post

    Hello Jeff,

    The RadWindow has been refactored. The Opened event is not supported anymore. You can do everything you need after the Show() method or in the Loaded event of the RadWindow. I see that in the Opened event you are trying to work around the problem with the focus in the RadAlert, is that so? If so, this issue is fixed in the Q3 2011 SP1, which just became life, so I suggest you to give it a try.

    Currently, we are experiencing difficulties in fixing the issue with the size to content functionality. We are aware of it and we are looking for a way to resolve it.
    Sorry for the caused inconvenience.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jeff
    Jeff avatar
    28 posts
    Member since:
    Aug 2010

    Posted 21 Dec 2011 Link to this post

    Hello,

    Where does the documentation indicate that the Opened even isn't meant to be used anymore? http://www.telerik.com/help/wpf/radwindow-events-overview.html 

    Also, how can I get a handle on the RadWindow.Loaded event if I'm just using RadWindow.Alert?

    Regarding the sizing, what is a workaround? Obviously this is a hard deal breaker in my ability to upgrading to a new version. When do you expected these issues to be resolved? Introducing a serious bug like this seems like it would be a high priority, but from your description, it sounds like it's still broken in Q3?

    Thank you.

    Jeff
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Dec 2011 Link to this post

    Hi Jeff,

    Sorry, the article will be corrected.
    As for the size to content issue - the problem is in the framework. Once the WPF window is resized the first time it stops working. And since we are inheriting it, the bug appears in the RadWindow. Due to the complexity of the task, I cannot give you a certain time frame when this issue is going to be fixed.
    Sorry for the caused inconvenience.
    Could you please share with us why do you need to hook to the Opened event and we will try to provide you with solution for your case.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  6. Jeff
    Jeff avatar
    28 posts
    Member since:
    Aug 2010

    Posted 22 Dec 2011 Link to this post

    Unfortunately, this kind of severe bug with sizing the window prohibits us from taking any new versions of Telerik until it's resolved...essentially making our subscription worthless.

    The reason we need the Opened event is because some of our imodal RadWindows (fired via RadWindow.Alert/Prompt/Confirm) have textbox content that should be auto focused once the window loads (the cursor should automatically appear in the textbox).
  7. George
    Admin
    George avatar
    1332 posts

    Posted 23 Dec 2011 Link to this post

    Hi Jeff,

    Please, excuse us for any inconvenience caused with removing the Opened event. We are aware of focus issue with the RadPrompt window - the textbox control didn't get the focus when is opened, but we can confirm that this problem is already resolved with our Q3 SP1 release. Could you give it a try and let me know if you still experience any issues with the RadWindow control. I am glad to assist you further.


    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready