This is a migrated thread and some comments may be shown as answers.

RadWindow.Confirm not displaying items in DialogParameters

3 Answers 129 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jaesoon
Top achievements
Rank 1
Jaesoon asked on 27 Jun 2016, 02:36 AM

Im wanting to use the RadWindow.Confirm control to show lots of text on the screen.

However, showing a lot of information means that the RadWindow will take up the whole screen which hides the buttons required for closing the RadWindow.

 

To get around this, i added a ScrollViewer with a max height which creates a scrollbar when needed.

This worked perfectly for RadWindow.Alert, but for some reason, the exact same thing is not working for RadWindow.Confirm.

 

For the alert, i have done the following 

var message = new TextBlock
        {
            Text = alertMessage,
            TextWrapping = TextWrapping.Wrap,
            Width = 400,
        };
 
var sv = new ScrollViewer
{
    Content = message,
    VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
    MaxHeight = 600,
    BorderThickness = new Thickness(0)
};
 
RadWindow.Alert(
    new DialogParameters
    {
        Header = header,
        Content = sv,
    });

 

For the RadWindow.Confirm, i do the following

var message = new TextBlock
{
    Text = confirmMessage,
    TextWrapping = TextWrapping.Wrap,
    Width = 400,
};
 
var sv = new ScrollViewer
{
    Content = message,
    VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
    MaxHeight = 600,
    BorderThickness = new Thickness(0)
};
 
RadWindow.Confirm(
    new DialogParameters
    {
        Header = header,
        Content = sv,
        Closed = (s, args) =>
        {
            if (args.DialogResult.Value)
            {
                if (ConfirmMessageEventArgs != null)
                {
                    ConfirmMessageEventArgs(confirmType, new WindowClosedEventArgs());
                }
            }
        }
    });

It is exactly the same as the alert window except it uses the Confirm method instead of Alert.

 

When i run this, the screen always shows up blank with nothing on it.

 

Is there any way to get the text to show?

3 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 29 Jun 2016, 12:20 PM
Hello Jaesoon,

Thank you for contacting us.

I've tried to reproduce the described issue at our side, but at no avail.
I've prepared a sample application using the provided code and in it everything appears to work as expected.

I will kindly ask you to send us a sample project demonstrating the issue or try to reproduce it in the attached project so we can investigate further.

Looking forward to your reply.

Regards,
Polya
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jaesoon
Top achievements
Rank 1
answered on 29 Jun 2016, 10:31 PM

Hi Polya

 

 

Thanks for your sample project, while i wasn't able to run it, after you said that this should also work, i've tried creating a new project and can indeed see that confirm windows can also have scroll viewers.

Unfortunately, the project that i'm working on is too big for me to just snip out the relevant parts needed to replicate the issue.

 

Could this have something to do with another issue i had (raised a support ticket with ID threadid=983814) to do with the type of binaries i'm using?

0
Polya
Telerik team
answered on 01 Jul 2016, 09:57 AM
Hello Jaesoon,

In the provided ticket reference I understand the discussion is about styling the RadGridView. If that is so I do not think that it might have relevance to the RadConfirm. Also I understand that you're using Xaml binaries, instead of No_Xaml - could you please confirm.

I suggest taking a look whether you have custom styles for the RadConfirm, RadAlert or RadWindow and if so the issue might be related to these custom styles. It would be very helpful if you could send them.

Looking forward to your reply.

Regards,
Polya
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Window
Asked by
Jaesoon
Top achievements
Rank 1
Answers by
Polya
Telerik team
Jaesoon
Top achievements
Rank 1
Share this question
or