Blend和VS2010之间的表格不同

时间:2011-03-06 23:36:10

标签: wpf blend

在Blend 4中查看附加的表单时,它在设计和运行时都会显示。在VS2010中查看时,在设计窗口中看起来非常不同。但是,它在运行时似乎是正确的。有线索吗? 这是代码:

<Window
    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"
    x:Class="LibraWPF.frmLoadTips"
    x:Name="Window_MainLoadTips"
    Title="Load Tips" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" Background="{x:Null}" Visibility="Visible" AllowsTransparency="True" Height="164" Width="305" IsEnabled="True" SizeToContent="Manual" MinWidth="305" MinHeight="164">

    <Border Margin="0,0,8,8" d:LayoutOverrides="HorizontalAlignment" BorderThickness="1,0,1,1" >
        <Border.BorderBrush>
            <SolidColorBrush Color="{DynamicResource HeaderBkgd}"/>
        </Border.BorderBrush>
        <Border.Effect>
            <DropShadowEffect BlurRadius="8" ShadowDepth="2" Color="#FF707070" RenderingBias="Quality"/>
        </Border.Effect>

        <Grid x:Name="LayoutRoot" >
            <Grid.Background>
                <SolidColorBrush Color="{DynamicResource LibraContainerBkgd}"/>
            </Grid.Background>
            <Label Content="Load Tips" Height="27.333" VerticalAlignment="Top" FontFamily="Segoe UI Symbol" FontSize="14.667"  >
                <Label.Background>
                    <SolidColorBrush Color="{DynamicResource HeaderBkgd}"/>
                </Label.Background>
            </Label>
            <Label Content="Select Tip Load Position:" HorizontalAlignment="Left" Height="27.491" Margin="37.684,41.427,0,0" VerticalAlignment="Top" Width="154.473" FontWeight="Bold"/>
            <ComboBox Margin="220.002,41.427,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="36" IsEditable="True"/>
            <Button Content="Go" Margin="37.684,91.173,0,0" x:Name="btnLoadTipsGo" Height="53.672" VerticalAlignment="Top" HorizontalAlignment="Left" Width="100.437" />
            <Button Content="Cancel" Margin="160.739,91.173,0,0" IsCancel="True" IsDefault="True" Click="btnLoadTipsCancel_Click" x:Name="btnLoadTipsCancel" Height="53.672" VerticalAlignment="Top" HorizontalAlignment="Left" Width="100.437" />
        </Grid>
    </Border>
</Window>

1 个答案:

答案 0 :(得分:1)

VS 2010 xaml编辑器在解决设计时资源方面做得很差。在SilverLight或WPF中工作时,我通常同时打开Studio an Blend。