RadWindow Opens with Transparent Background

Thread is closed for posting
2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Apr 2011

    Posted 18 May 2011 Link to this post

    I have several RadWindows in my WP7 app. The first one is part of MainPage.xaml and it opens with a black background (expected).
    When I navigate to a different page that contains another RadWindow, the window initially opens when the page loaded event is fired. The first time this RadWindow opens, its background is transparent and not black (default) which I want. When I close the RadWindow and reopen it via the ApplicationBar it displays with the black background. Truly Bizzaro.

        <Grid x:Name="LayoutRoot" >
                <ImageBrush ImageSource="/MyAppName;component/images/SinglePageBackground.png" 
                            Stretch="Fill"  />
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>

            <!--TitlePanel contains the name of the application and page title-->
            <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,10">
                <TextBlock x:Name="ApplicationTitle" Text="My App Title" Style="{StaticResource PhoneTextNormalStyle}"/>
                <TextBlock x:Name="PageTitle" Text="My Page Title" 
                           Margin="9,5,0,0" Foreground="White" FontWeight="Bold" 
                           FontSize="35" TextAlignment="Left" />

            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Height="Auto">
                <ListBox x:Name="lbItemsList"  >
                        <ImageBrush ImageSource="/PersonalMedsTraker;component/images/MedItemsBackground.png" 
                                            Stretch="Fill" Opacity=".65" />
      ***** Lots of stack panels in here *******
                <TextBlock x:Name="tbID" Visibility="Collapsed" />

            <telerikPrimitives:RadWindow x:Name="rwHelpInfo" IsFullScreen="True" IsOpen="False" >
                        <RowDefinition  Height="670"/>
                        <RowDefinition Height="*"/>

                    <ScrollViewer Grid.Row="0">
                        <Grid >
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />

                            <TextBlock Text="Help Page"  Margin="0,10,0,5" FontSize="27" Grid.Row="0"/>
                            <TextBlock  TextWrapping="Wrap" Margin="0,5,0,0" Grid.Row="1" FontSize="25">

                    <Button x:Name="btClose"  Content="Close" Grid.Row="1"  HorizontalAlignment="Center"  
                                    Click="btClose_Click"  Width="175" Margin="0,15,0,0"   />

  2. Victor
    Victor avatar
    1358 posts

    Posted 25 May 2011 Link to this post

    Hello John,

     Thank you for writing.

    This behavior is indeed strange however, this XAML alone is not enough to diagnose the real cause.

    I think you'd be interested to know that RadWindow uses a hack to improve its performance when it is in full screen mode. When IsFullScreen is true, RadWindow waits for its OpenAnimation to finish and then sets the Opacity property of all its siblings to 0. This usually decreases the fill rate by a huge amount and therefore provides a performance improvement. You can also simulate the IsFullScreen property by setting the PlacementTarget property of RadWindow to the layout root panel (or even the page) and then set the WindowSizeMode property to FitToPlacementTarget. This will avoid the opacity hack.

    I hope the information below might give you a hint how to find the cause of the issue. If you still need assistance, please provide a small sample application that demonstrates the strange behavior so that I may assist you further.

    Kind regards,
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top