を制御し、私のフレームサイズは、WPFウィンドウのサイズを取得し、コードは次のとおりです。フレームページは、私が間違っている場所を教えてくださいでしたレイアウト
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BSP" Height="700" Width="990" WindowStartupLocation="CenterScreen">
<Grid Background="Green" VerticalAlignment="Center" HorizontalAlignment="Center" >
<Frame Name="MainFrame" Source="LoginScreen.xaml" NavigationUIVisibility="Hidden" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
</Grid>
</Window>
ウィンドウよりも少ないページサイズとも合計余白のサイズ+幅+ラベルのサイズがページのサイズより小さく、ボタンがカットとして表示されています。ページのコード以下の通りです:
<Page x:Class="Loggedin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="660" Width="920"
Title="Loggedin">
<Grid Background="white" Margin="2">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
<Label Content="Loggedin as" Height="28" HorizontalAlignment="Left" Name="Loggedinas" />
<Button Content="LogOut" Margin="780,0,0,0" Height="28" Name="Logout" Width="50" HorizontalAlignment="Right"/>
</StackPanel>
</Grid>
</Page>
あなたは私を支援してもらえ、それは2日:(から私の脳を食べている次の出力の写真です:。 ピックビジュアルスタジオから:http://clip2net.com/s/1Fpb7
picからランタイム:http://clip2net.com/s/1FpbQ
これは、フレームの水平方向と垂直方向のアライメントをストレッチするように設定するために、小さな変更にも役立ちました。答えてくれてありがとう。 – surpavan