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

Q2 2012.2.607 no popup...justp lain text

1 Answer 23 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 29 Jun 2012, 08:34 AM
Hello,
I've got a problem with radwindow... I've upgraded from q3'11 to q2' 12 and when I use a radwindow I got no "popup" window, just splashed context on the current page...I've tried setting IsTopMost = true  and removing ResizeMode but nothing happens... what can be the cause of the problem?

He're my login.xaml

<telerik:RadWindow
    xmlns:local="clr-namespace:xxx.Controls"
    xmlns:login="clr-namespace:xxx.Login"
    x:Class="xxx.Login.LoginForm"
    KeyDown="LoginForm_KeyDown"
    mc:Ignorable="d" HorizontalAlignment="Center" CanClose="False" IsTopmost="True"
   >
    <telerik:RadWindow.Header>
        <StackPanel Orientation="Horizontal">
            <Image Source="../../Images/16x16/logo.png"></Image>
            <TextBlock Text="Login Form"></TextBlock>
        </StackPanel>
    </telerik:RadWindow.Header>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="20"></RowDefinition>
            <RowDefinition ></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Text="Nome utente" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" ></TextBlock>
        <TextBlock Text="Password" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0,5,0,0"  ></TextBlock>
        <TextBox x:Name="tbUserName" Grid.Row="0" Grid.Column="1"  Margin="0,0,5,0" HorizontalAlignment="Stretch"></TextBox>
        <PasswordBox x:Name="tbPassword" Grid.Row="1" Grid.Column="1" Margin="0,5,5,0"  HorizontalAlignment="Stretch"   ></PasswordBox>
        <CheckBox Grid.Row="2" Content="Ricorda utente" Grid.ColumnSpan="2" VerticalAlignment="Center" Name="cbRememberMe"></CheckBox>
        <TextBlock Name="tbMessaggioErrore" Text="Nome Utente o Password non valida" Grid.Row="3" Grid.ColumnSpan="2" Foreground="Red" Visibility="Collapsed"></TextBlock>
        <StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15,5,0" >
            <Button x:Name="loginButton" Content="OK" Click="LoginButton_Click" Width="60"/>
            <Button x:Name="loginCancel" Content="Cancel" Click="CancelButton_Click" Width="60" Margin="5,0,0,0"  />
        </StackPanel>
    </Grid>
</telerik:RadWindow>


Thanks

1 Answer, 1 is accepted

Sort by
0
Lancelot
Top achievements
Rank 1
answered on 02 Jul 2012, 04:31 PM
Hi Paolo,

I wasn't able to reproduce your problem, see the attached image. The only difference was I put the RadWindow into it's own UserControl. It seems you are using the control directly without any parent container, and this would cause unexpected behavior. 

I recommend you either have the control as it's own element in the parent page, or create a new UserControl to house the login dialog. Below is the example I wrote to test your code. (I removed the event handlers and namespaces for simplicity). Notice I have the RadWindow inside the MainPage.xaml and then call for it's visibility through the example button click event. This is only to demonstrate that is is still highest element on the page.

<UserControl x:Class="SLRadWindowPOPupIssue.MainPage"
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot">
        <Button Content="Open/Close RadWindow" Click="Button_Click" Width="200" VerticalAlignment="Top"  HorizontalAlignment="Left" />
        <telerik:RadWindow x:Name="RW"
                           VerticalAlignment="Center" 
                           HorizontalAlignment="Center"
                           CanClose="False"
                           IsTopmost="True" >
            <telerik:RadWindow.Header>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Images/16x16/logo.png"></Image>
                    <TextBlock Text="Login Form"></TextBlock>
                </StackPanel>
            </telerik:RadWindow.Header>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="20"></RowDefinition>
                    <RowDefinition ></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
 
                    <ColumnDefinition Width="100"></ColumnDefinition>
 
                    <ColumnDefinition></ColumnDefinition>
 
                </Grid.ColumnDefinitions>
                <TextBlock Text="Nome utente" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" ></TextBlock>
                <TextBlock Text="Password" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0,5,0,0"  ></TextBlock>
                <TextBox x:Name="tbUserName" Grid.Row="0" Grid.Column="1"  Margin="0,0,5,0" HorizontalAlignment="Stretch"></TextBox>
                <PasswordBox x:Name="tbPassword" Grid.Row="1" Grid.Column="1" Margin="0,5,5,0"  HorizontalAlignment="Stretch"   ></PasswordBox>
                <CheckBox Grid.Row="2" Content="Ricorda utente" Grid.ColumnSpan="2" VerticalAlignment="Center" Name="cbRememberMe"></CheckBox>
                <TextBlock Name="tbMessaggioErrore" Text="Nome Utente o Password non valida" Grid.Row="3" Grid.ColumnSpan="2" Foreground="Red" Visibility="Collapsed"></TextBlock>
                <StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15,5,0" >
                    <Button x:Name="loginButton" Content="OK"  Width="60"/>
                    <Button x:Name="loginCancel" Content="Cancel"  Width="60" Margin="5,0,0,0"  />
                </StackPanel>
            </Grid>
 
        </telerik:RadWindow>
    </Grid>
</UserControl>


I hope this helps.

Good Luck,
Lancelot
Tags
Window
Asked by
Michele
Top achievements
Rank 2
Answers by
Lancelot
Top achievements
Rank 1
Share this question
or