【silverlight的简单问题】
- C# code
<UserControl x:Class="SA6.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="800" > <Grid x:Name="LayoutRoot" Background="red"> <Grid.RowDefinitions> <RowDefinition Height="48*" /> <RowDefinition Height="50*" /> <RowDefinition Height="202*" /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" Grid.Row="0" Background="BurlyWood" HorizontalAlignment="Center" VerticalAlignment="Top" Height="50" Width="800" Grid.RowSpan="2"> <TextBlock Height="23" Width="150"> <TextBlock.Text>我是textblock3</TextBlock.Text> </TextBlock> <TextBlock Text="我是textblock2" Height="23" Width="150"></TextBlock> </StackPanel> <Grid VerticalAlignment="Top" HorizontalAlignment="Center" Height="50" Width="800" Background="Aqua" Grid.Row="1"> </Grid> </Grid></UserControl>
为什么他stackpanel和grid不 挨着 怎么才能让他俩挨着
- C# code
<ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" VerticalScrollBarVisibility="Visible" Background="White">Style="{StaticResource PageScrollViewerStyle}" 这个样式是什么意思
还有 怎么引用外部的xaml样式
[解决办法]
问题1:
- XML code
<Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /></Grid.RowDefinitions>
[解决办法]
[解决办法]
有mager 的属性 ,可以设置 四个角落的 偏差值 可以使用负数