2011-03-06 2 views
0

첨부 된 폼을 블렌드 4에서 볼 때 디자인 및 런타임 중에 표시되는 것처럼 나타납니다. VS2010에서 보았을 때 디자인 윈도우에서 매우 다르게 보입니다. 그러나 실행 중일 때 올바르게 나타납니다. 모든 단서?폼이 블렌드와 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

은 VS 2010 XAML 편집기는 디자인 타임 자원을 해결 가난한 작업을 수행합니다 이 코드입니다. SilverLight 또는 WPF에서 작업 할 때 일반적으로 Studio와 Blend를 동시에 열어 놓았습니다.

+0

나는 많은 것을 생각했지만, 이것은 상당히 나쁘다. VS에서는 두 버튼의 높이의 절반 이상이 창의 아래쪽 가장자리로 잘립니다. VS에서 올바르게 보이도록 조정하면 Blend 및 런타임에 표시되지 않습니다. – imadman