problem, RadWindow does not show in XBAP

7 posts, 0 answers
  1. Ramiro
    Ramiro avatar
    46 posts
    Member since:
    Aug 2010

    Posted 07 Dec 2010 Link to this post

    hi!

    I have a XBAP project for web, and I have a Page that shows a telerik components. I have a RadWindow as a usercontrol in this way:

    <telerikNavigation:RadWindow x:Class="App_ControlLibrary.frmDialogoEntradaDatos"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
                 xmlns:lr="clr-namespace:App_ControlLibrary"
                 telerik:StyleManager.Theme="Windows7"
                 Height="181" Width="410" BorderBackground="#FF4B72B1" BorderBrush="#FF0C0F21" ResizeMode="NoResize" Header="{x:Static lr:resxDialogoEntradaDatos.titDialogo}">
        <Grid>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF80A1E4" Offset="0"/>
                    <GradientStop Color="White" Offset="0.5"/>
                    <GradientStop Color="#FF5C86DC" Offset="1"/>
                    <GradientStop Color="#FFA8C5FF" Offset="0.139"/>
                    <GradientStop Color="#FFA6C3FF" Offset="0.787"/>
                </LinearGradientBrush>
            </Grid.Background>
            <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal">
                <StackPanel Width="64" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Center">
                    <Image Source="Imagenes/Interrogante.png" Width="50" Height="50" VerticalAlignment="Center"/>
                </StackPanel>
                <StackPanel Width="328" Height="Auto" HorizontalAlignment="Right">
                    <Grid Height="41">
                        <TextBlock x:Name="lbltitulo" Text="Hola Mundo" Margin="0" Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" FontFamily="Tahoma" FontSize="13.333" Foreground="Black"/>
                    </Grid>
                    <Grid x:Name="pnlTexto" Height="49" Visibility="Visible">
                        <TextBox x:Name="txtDato" Style="{StaticResource Estilo1TextBox}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="313" MaxLines="1">
                            <TextBox.Effect>
                                <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                            </TextBox.Effect>
                        </TextBox>
                    </Grid>
                    <Grid x:Name="pnlPassword" Height="49" Visibility="Hidden">
                        <PasswordBox x:Name="txtPassword" Style="{StaticResource Estilo1PasswordBox}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="313">
                            <PasswordBox.Effect>
                                <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                            </PasswordBox.Effect>
                        </PasswordBox>
                    </Grid>
                    <Grid x:Name="pnlLista" Height="49" Visibility="Hidden">
                        <telerik:RadComboBox x:Name="cbxLista" IsSynchronizedWithCurrentItem="True" EmptyText="{x:Static lr:resxDialogoEntradaDatos.msjSeleccione}" IsEditable="False" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="317">
                            <telerik:RadComboBox.Effect>
                                <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                            </telerik:RadComboBox.Effect>
                        </telerik:RadComboBox>
                    </Grid>
                    <Grid x:Name="pnlNumero" Height="49" Visibility="Hidden">
                        <telerik:RadMaskedTextBox x:Name="fmtDato" Mask="n0" MaskType="Numeric" HorizontalContentAlignment="Right" Height="27" VerticalAlignment="Center" HorizontalAlignment="Center" Width="180">
                            <telerik:RadMaskedTextBox.Effect>
                                <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                            </telerik:RadMaskedTextBox.Effect>
                        </telerik:RadMaskedTextBox>
                    </Grid>
                    <Grid x:Name="pnlFecha" Height="59" Visibility="Hidden">
                        <telerik:RadDateTimePicker x:Name="dtpFecha" InputMode="DatePicker" DisplayFormat="Short" DateTimeWatermarkContent="{x:Static lr:resxDialogoEntradaDatos.msjIngreseFecha}" Height="27" VerticalAlignment="Center" HorizontalAlignment="Center">
                            <telerik:RadDateTimePicker.Effect>
                                <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                            </telerik:RadDateTimePicker.Effect>
                        </telerik:RadDateTimePicker>
                    </Grid>
                    <Grid Height="51">
                        <Button x:Name="btnAceptar" Content="{x:Static lr:resxDialogoEntradaDatos.btnAceptar}" BorderBrush="Black" Foreground="White" Height="29" VerticalAlignment="Center" HorizontalAlignment="Center" Width="99.696" Click="btnAceptar_Click">
                            <Button.Background>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                    <GradientStop Color="#FFB9DEFF" Offset="0"/>
                                    <GradientStop Color="#FF3B9CF5" Offset="0.5"/>
                                    <GradientStop Color="#FF0077E5" Offset="0.539"/>
                                    <GradientStop Color="#FF366FA5" Offset="1"/>
                                </LinearGradientBrush>
                            </Button.Background>
                        </Button>
                        <Path Data="M1,4 L379,5" Fill="#FF6289BC" Height="2" Margin="0,4,-1,0" Stretch="Fill" Stroke="Black" VerticalAlignment="Top"/>
                    </Grid>
                </StackPanel>
            </StackPanel>
        </Grid>
    </telerikNavigation:RadWindow>

    My problem is when I try to show this window in my main program by clicking a button, code is like this: 

    frmDialogoEntradaDatos frmDialogo = new frmDialogoEntradaDatos();
    frmDialogo.Mensaje = resxUsuarios.titSolicitudPassword;
    frmDialogo.TipoDialogo = frmDialogoEntradaDatos.Tipo.TEXTO_PASSWORD;
    frmDialogo.OnClose += new CloseEventHandler(EstablecerContraseña);
    frmDialogo.Show();

    frmDialogo is never shown, not even using ShowDialog(). I try to test original RadWindow instance like this:

    RadWindow frmDialogo = new RadWindow();
    frmDialogo.Width = 300;
    frmDialogo.Height = 180;
    frmDialogo.ShowDialog();

    but nothing happen, but when using RadWindow.Alert(new DialogParameters() ... ); Works fine!

    Thanks for your help
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 10 Dec 2010 Link to this post

    Hi Ramiro,

    Thank you for contacting us.

    Could you please check this PITS item - http://www.telerik.com/support/pits.aspx#/public/wpf/2838. If that is the case, you can track its status and see when it is going to be fixed. If this is not your scenario, could you please try to reproduce the issue in a sample application and send it to us. In that way we will be able to track down the source of the problem and provide you with a solution.

    Looking forward to your reply.

    Regards,
    Konstantina
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ramiro
    Ramiro avatar
    46 posts
    Member since:
    Aug 2010

    Posted 10 Dec 2010 Link to this post

    Hi!

    I guess I found the problem. When I instance a RadWindow in any part of project works fine, except when it is after a MessageBox.Show or into its scope. For example:

    public partial class Prueba1 : Page
    {
       public Prueba1()
       {
          InitializeComponent();
       }
     
       private void button1_Click(object sender, RoutedEventArgs e)
       {
                RadWindow frmDialogo2 = new RadWindow();
                frmDialogo2.Width = 300;
                frmDialogo2.Height = 180;
                frmDialogo2.ShowDialog();
       }
    }

    in this case it works perfectly!!!

    but in this case:

    public partial class Prueba1 : Page
    {
        public Prueba1()
        {
            InitializeComponent();
        }
     
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Hello World TODAY");
     
            RadWindow frmDialogo2 = new RadWindow();
            frmDialogo2.Width = 300;
            frmDialogo2.Height = 180;
            frmDialogo2.ShowDialog();
        }
    }

    It doesn't work, frmDialogo2 is not shown or may be is loaded but is hidden. Even in this case it's not shown: 


    if (MessageBox.Show("Press Yes if you agree", "Question", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
    {
      RadWindow frmDialogo2 = new RadWindow();
      frmDialogo2.Width = 300;
      frmDialogo2.Height = 180;
      frmDialogo2.ShowDialog();
    }

    BUT, curiously in this case it works:

    RadWindow frmDialogo2 = new RadWindow();
     frmDialogo2.Width = 300;
     frmDialogo2.Height = 180;
     frmDialogo2.ShowDialog();
     
     MessageBox.Show("Hello World TODAY");

    I need in some cases to use MessageBox due to it freezes pages (It acts as modal) waiting for a button click.

    How can I do to resolve this combining MessageBox and RadWindow?

    thanks
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 13 Dec 2010 Link to this post

    Hello Ramiro,

    Thank you for the details.

    I have tried to reproduce the issue with the Q3 release assemblies, but to no avail. Attached I am sending you a short video in which you can observe my attempt. Please let me know if I am doing something wrong.
    Please send us a sample project in which the issue is reproducible and the version of the assemblies which you are using. In that way we will be able to track down the source of the problem and provide you with a solution for it.

    Looking forward to your reply.

    Best wishes,
    Konstantina
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Ramiro
    Ramiro avatar
    46 posts
    Member since:
    Aug 2010

    Posted 13 Dec 2010 Link to this post

    Hi!

    I would like to tell you my project is XBAP and all my program is running on IE7 browser directly, even debug version (on Windows 7). Please try this scenario. Version of Telerik.Windows.Controls.Navigation is 2010.3.1110.35


    thanks
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 16 Dec 2010 Link to this post

    Hello Ramiro,

    We were able to locate the problem and a fix is included in the latest internal build. It will be also included in Q3 2010 SP1 which due in a few days.

    Please let us know if you have any other questions about our controls.

    Greetings,
    Konstantina
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  8. Ramiro
    Ramiro avatar
    46 posts
    Member since:
    Aug 2010

    Posted 17 Dec 2010 Link to this post

    Thanks very much
Back to Top
UI for WPF is Visual Studio 2017 Ready