阅读背景:

silverlight:ScrollViewer的各种高度研究

来源:互联网 

直接给码:

<UserControl x:Class="SilverlightApplication1.MainPage"
    xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="https://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="https://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Width="640" Height="300">

    <Grid x:Name="LayoutRoot" Background="LightBlue">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="Auto" MinHeight="30"></RowDefinition>
        </Grid.RowDefinitions>
        <ScrollViewer Name="sv" VerticalScrollBarVisibility="Visible" LostMouseCapture="sv_LostMouseCapture">
            <Border Background="Azure" BorderBrush="Black" Margin="5" BorderThickness="1" Height="400"></Border>
        </ScrollViewer>
        <StackPanel Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="Test" Click="Button_Click" HorizontalAlignment="Center" Padding="10,0"></Button>
            <TextBlock x:Name="tb1" Margin="10,0,0,0"></TextBlock>
        </StackPanel>
    </Grid>
</UserControl>
<UserControl x:Class="SilverlightAp



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: