The following code produces a confirm Window but it displays the control object type name and not what I assigned to the DialogParameters
Resulting text in Confirm Window:
"Telerik.Windows.Controls.DialogParameters"
Here is my code:
Dim rWParameters As New Telerik.Windows.Controls.DialogParameters
With rWParameters
.Header = "CONFIRMATION"
.Content = "My message to confirm action"
.OkButtonContent = "Yes"
.CancelButtonContent = "No"
End With
RadWindow.Confirm(rWParameters, AddressOf ShowConfirmationOnClosed)
Private Sub ShowConfirmationOnClosed(sender As Object, e As WindowClosedEventArgs)
Try
If e.PromptResult = "Yes" Then
DoSomething()
End If
Catch ex As Exception
Dim Problem As New Errors(ex)
End Try
End Sub
If I do NOT use DialogParameters and just do this:
RadWindow.Confirm("My message to confirm action", AddressOf ShowConfirmationOnClosed)
I see the confirm Window with correct message.
So it looks like RadWindow.Confirm doesn't accept DialogParameters even though the sample in your documentation indicates it does or should.
I'm using version 2016.1.112.1050 of Telerik.Windows.Controls ... I realize there is a more recent version, but no indication it fixes a problem with RadWindow.Confirm.
Help needed ASAP, please.
Cheers, Rob.
Private
Sub moPART_AnswerImage_MouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles moPART_AnswerImage.MouseLeftButtonDown
Dim oImageViewer As New Radwindow2
oImageViewer.ShowDialog()
End Sub
Find below is the xaml for Radwindow2
<tkNavigation:RadWindow
x:Class="RAMWare.Controls.dlg_PhotoViewer"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:msControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:tkNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:tkControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
Height="Auto"
Width="Auto"
WindowStartupLocation="CenterScreen"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid x:Name="LayoutRoot" Margin="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical">
<Image x:Name="imgPhoto" Height="Auto" Width="Auto" Stretch="Uniform" />
<StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
<StackPanel Width="Auto" Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
<Button
x:Name="cmdRotateCounterClockwise"
Content="RotateCounterClockwise"
Width="Auto"
Height="23"
HorizontalAlignment="Left" />
<Button
x:Name="cmdOK"
Content="OK"
Width="75"
Height="23"
HorizontalAlignment="Center" />
<Button
x:Name="cmdRotateClockwise"
Content="RotateClockwise"
Width="Auto"
Height="23"
HorizontalAlignment="Right" />
</StackPanel>
<TextBlock
x:Name="tblError"></TextBlock>
</StackPanel>
</StackPanel>
</Grid> </tkNavigation:RadWindow>
If user single click a image present in Radwindow1 it has to open Radwindow2.If user double cliks of a image present in Radwindow1 also opens a Radwindow2.But user double clicks a image, radwindow2 is opening behind Radwindow1 that is parent window.
How to solve the problem?
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?
Hi,
I am new to telerik. I am doing a web automation now. In the web page there is a browse button, when I click it, a pop-up window appears. After that code is getting stopped. I am not able to proceed further. Actually I want to give a path in that pop-up window that appears, but I am not able to.
Could you please help me to solve this issue.
Thanks in advance :)