2012-04-15 2 views
1

私のxamlの画面の残りの部分を見るにはどうすればいいですか?高さ2000ピクセルのテキストブロックを追加しました。どのように残りの部分を見ることができますか?第2の問題は、私のXAMLで私のテキストがきれいにです。エミュレータでは1行ですべてです。最初の部分については残りの画面を見る方法ビジュアルスタジオの電話

<phone:PhoneApplicationPage 
    x:Class="Excercises.Weider_s_six" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}" 
    FontSize="{StaticResource PhoneFontSizeNormal}" 
    Foreground="{StaticResource PhoneForegroundBrush}" 
    SupportedOrientations="Portrait" Orientation="Portrait" 
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" 
    shell:SystemTray.IsVisible="True"> 

    <!--LayoutRoot is the root grid where all page content is placed--> 
    <Grid x:Name="LayoutRoot" Background="#FF1FB0DB"> 
     <Grid.RowDefinitions> 
      <RowDefinition Height="Auto"/> 
      <RowDefinition Height="*"/> 
     </Grid.RowDefinitions> 

     <!--TitlePanel contains the name of the application and page title--> 
     <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> 
      <TextBlock x:Name="PageTitle" Text="Weider's six" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="64" /> 
     </StackPanel> 

     <!--ContentPanel - place additional content here--> 

     <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> 
     <ScrollViewer> 
       <TextBlock Height="2000" HorizontalAlignment="Left" Margin="0,6,0,0" Name="TextBlock1" Text="Weider 6 pack Training is a perfect exercise for flat stomach. 
    This easy training programme has many advantages. 
    It's perfect for beginners and for experts – exercises are easy and begin with the basic level, so every beginner can use them but they get more complicated pretty fast so advanced sportsmen can also be interested in them. 
    It helps not only carve your muscles but also burn fat – during the exercise you not only use your abdominal rectus but you also move your legs and arms. It is also because W6 puts pressure on the number of repetitions. It carves your muscles but also burns fat. You can train W6 for about 40 minutes without taking any breaks – you use up all glycogen in blood and start burning the fat. 
    It is easy – it is a really easy training set which you can train almost anywhere. All you need is flat ground. 
    It gives excellent results – if you want to have a flat stomach W6 is designed just for you. You can see the first effects after just a week and after a whole series it is really impressive. 
    How to do Weider 6 

    Starting Position 

    Lay flat on the ground, hands along the body. 
    1 – exercise 1 

    Lift your right leg and bend your knee to right angle angle 
    Lift your upper torso to contract abdominal muscles and hold the lifted knee with your hands. 
    Hold still for 3 seconds. 
    Return to the starting position. 
    Repeat the exercise with the other leg 
    2 – exercise 2 

    Lift both legs and bend your knees to right angle 
    Lift your upper torso to contract abdominal muscles and hold both knees 
    Hold still for 3 seconds 

    Return to the starting position" VerticalAlignment="Top" Width="450" /> 
     </ScrollViewer> 
     </Grid> 

    </Grid> 

    <!--Sample code showing usage of ApplicationBar--> 
    <!--<phone:PhoneApplicationPage.ApplicationBar> 
     <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> 
      <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/> 
      <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/> 
      <shell:ApplicationBar.MenuItems> 
       <shell:ApplicationBarMenuItem Text="MenuItem 1"/> 
       <shell:ApplicationBarMenuItem Text="MenuItem 2"/> 
      </shell:ApplicationBar.MenuItems> 
     </shell:ApplicationBar> 
    </phone:PhoneApplicationPage.ApplicationBar>--> 

</phone:PhoneApplicationPage> 
+0

[画面の残りの部分を表示し、視覚的スタジオの電話を追加する方法]の複製可能性(http://stackoverflow.com/questions/10164611/how-to-see-the-rest-of-screen-and) -add-more-text-visual-studio-phone) –

+0

私は他の質問のための助けを得なかった。ただのため。 –

答えて

0

、ScrollViewerの中にあなたのTextBlockを含めるとAutoにそのWidthHeightを設定します。

次に、テキストブロックXAMLにTextWrapping="Wrap"を設定し、textblockのTextAlignmentプロパティを必要な値に設定します。

そして、あなたがテキストをフォーマットしたい場合は、このようなものを使用することができます

<TextBlock FontFamily="Arial" Width="Auto" Height="Auto" TextWrapping="Wrap"> 
<LineBreak/> 
<Run Foreground="Maroon" FontFamily="Courier New" FontSize="40"> 
Some text 1 
</Run> 
<LineBreak/> 
<Run text="Some Text 2"/> 
<LineBreak/> 
</TextBlock> 

<LineBreak/>が新しい行に対応します。

これはあなたのすべての問題を解決すると思います。

詳細については、thisを参照してください。