locked
Layout Oddity RRS feed

  • Question

  • Hello Everyone...

     I'm experiencing an odd phenomena that as an SL noob I don't quite get.  I have a frame in the center of my home page into which I "insert" various pages.  Even though I have the new pages set to fill the frame, I frequent see "pieces" of the page appearing below the intended content.  I know this may not be clear, sorry... For instance, I have a series of text boxes that are animated to fade in and out.  The text appears and fades fine, but at the bottom I can see fragments of the text, like the very bottom of the letters where they of course shouldn't be.  I've tried experimenting with various stretches etc, but not having a lot of luck.  Any suggestions?

    Thanks!

    Paul

    Monday, February 22, 2010 10:03 AM

Answers

  • It sounds like the Page (Home.xaml) looks normal on its own but when you add it to a Frame, it renders the content in the Frame and repeats the bottom again outside of the Frame.  In your Home.xaml, try to just add a Button (and nothing else) to see if the issue still occurs. 

    You have a RenderTransformOrigin in your Home.xaml.  Are you doing any transformation that would cause any of the items to move or scale?

    Monday, February 22, 2010 12:39 PM
  •  

    Thanks again for the time, and the reply Fury.  That's what I wound up doing... that is just adding buttons at the bottom and taking out the frame I had there.  In some cases I'm not thrilled with the resulting look, but it's certainly better than having those funky ghosts at the bottom.  Very odd... I'm very very new to this so I don't know if it's a Blend fluke or something I should know better.

    Monday, February 22, 2010 1:02 PM

All replies

  • Can you post the XAML for repro?

    Monday, February 22, 2010 10:45 AM
  • Well, I can try Fury... although it happens with several different pages that I'm inserting into a main frame.  What it seems to be is that, for example, I have a page that is essentially a list box and some buttons.  I'm inserting that as the content in a frame, and below the frame boundaries, it repeats the very bottom edge of the content that is being inserted.  In other words, if the bottom of the page that is being placed into the frame is buttons, I can see the buttons repeated outside the boundaries of the frame in which they are inserted, if that makes any sense?  I've been "fixing" it by fiddling with the layout of the content that is placed into the frames, but in some cases I don't like the outcome.  I'll try and paste in the relevant XAML, hopefully I'm giving you what you need :S

    <navigation:Frame x:Name="MainContentFrame" Margin="210,64,121,48" Source="/Views/Home.xaml"/>

    Is how I'm specifying the frame. 

    And the contents (I assume) is:

    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource News_ItemDataSource}}" Margin="0" >
      <Grid RenderTransformOrigin="0.5,0" Margin="8,48,8,0">
       <TextBox x:Name="searchNewsTxtBox" Margin="0,0,144,40" VerticalAlignment="Bottom" Text="Enter Search Here" TextWrapping="Wrap" GotFocus="searchNewsTxtBox_GotFocus" HorizontalAlignment="Right" Width="195"/>
       <Button x:Name="searchNewsBtn" FontSize="13.333" FontWeight="Bold" Foreground="#FFFAF8F8" Template="{StaticResource Glass Button}" Height="32" Margin="232,0,368,32" VerticalAlignment="Bottom" Content="Search News Archives" Click="searchNewsBtn_Click"/>
       <Button x:Name="getThisWeeksNews" Background="#FF060635" FontSize="13.333" FontWeight="Bold" Foreground="#FFFEFCFC" Template="{StaticResource Glass Button}" Height="32" HorizontalAlignment="Left" Margin="19,0,0,32" VerticalAlignment="Bottom" Width="192" Content="Get This Week's News" Click="getThisWeeksNews_Click"/>
       <ListBox x:Name="NewsListBox" Margin="0,0,96,96" ItemsSource="{Binding Mode=OneWay}" DataContext="{Binding}" ItemTemplate="{StaticResource ListBoxDataTemplate1}" Style="{StaticResource ListBoxStyle1}" ItemContainerStyle="{StaticResource ListBoxItemStyle2}" Background="#FFC5C5C5" BorderThickness="3" ItemsPanel="{StaticResource ItemsPanelTemplate1}" BorderBrush="#FF0606A5" >
        <ListBox.Effect>
         <DropShadowEffect Color="#FF082166" ShadowDepth="16" BlurRadius="10"/>
        </ListBox.Effect>
       </ListBox>
      </Grid>

    I'm using Blend, so rather than editing the XAML, I'm doing this all visually...

    Appreciate your reply and any suggestions!

     

    Paul

    Monday, February 22, 2010 11:12 AM
  • It sounds like the Page (Home.xaml) looks normal on its own but when you add it to a Frame, it renders the content in the Frame and repeats the bottom again outside of the Frame.  In your Home.xaml, try to just add a Button (and nothing else) to see if the issue still occurs. 

    You have a RenderTransformOrigin in your Home.xaml.  Are you doing any transformation that would cause any of the items to move or scale?

    Monday, February 22, 2010 12:39 PM
  •  

    Thanks again for the time, and the reply Fury.  That's what I wound up doing... that is just adding buttons at the bottom and taking out the frame I had there.  In some cases I'm not thrilled with the resulting look, but it's certainly better than having those funky ghosts at the bottom.  Very odd... I'm very very new to this so I don't know if it's a Blend fluke or something I should know better.

    Monday, February 22, 2010 1:02 PM