我上傳了我的窗口畫面,還有白色的空間,我需要填寫與用戶控件,但我不能頂部固定在那裏,下,左,右請指點我如何能做到這一點感謝:)WPF需要有關面板
XAML
<ribbon:RibbonWindow x:Class="H_Pro.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
Title="H-Pro. Version 1.0.0" Height="394" Width="856" xmlns:my="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon" WindowState="Maximized" Loaded="RibbonWindow_Loaded">
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<my:Ribbon x:Name="MainRibbon" Height="auto" Width="auto" AllowDrop="False" ClipToBounds="False" DataContext="{Binding}" Focusable="True" IsCollapsed="False" IsDropDownOpen="True" IsManipulationEnabled="False" IsMinimized="False">
<my:RibbonTab Header="Main">
<my:RibbonGroup Name="SecurityRibbonGroup" Header="Security" Width="100">
<my:RibbonButton Name="btnChangeUser" Label="Change User" LargeImageSource="/H-Pro;component/Images/1310403730_group.png" Click="btnChangeUser_Click">
</my:RibbonButton>
<my:RibbonButton Name="btnUserList" Label="Users List" LargeImageSource="/H-Pro;component/Images/1294319913_people.png" Click="btnUserList_Click" />
</my:RibbonGroup>
<my:RibbonGroup Name="BookingOperationsRibbonGroup" Header="Booking Informations" Width="auto">
<my:RibbonButton Label="New Booking" Name="btnNewBooking" LargeImageSource="/H-Pro;component/Images/1310421580_appointment-new.png" />
<my:RibbonButton Label="Booking List" Name="btnBookingList" LargeImageSource="/H-Pro;component/Images/booking.png"/>
</my:RibbonGroup>
<my:RibbonGroup Name="GuestRibbonGroup" Header="Guest Operations" Width="auto">
<my:RibbonButton Name="btnGuestDataBase" Label="Guest Database" LargeImageSource="/H-Pro;component/Images/dbd.png" />
<my:RibbonGroup />
<my:RibbonButton Label="Add New Guest"/>
<my:RibbonButton Label="Top Guests"/>
</my:RibbonGroup>
</my:RibbonTab>
<my:RibbonTab Header="Add/Edit" Name="AddEditRibbonTab">
<my:RibbonGroup Name="AddRooms" Header="Rooms" Width="auto">
<my:RibbonButton Label="Add/Edit Rooms" Name="btnAddEditRooms" LargeImageSource="/H-Pro;component/Images/1310459678_hotel4stars.png" />
</my:RibbonGroup>
</my:RibbonTab>
</my:Ribbon>
<Grid Grid.Row="1" Name="grid1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<DockPanel LastChildFill="False">
<StackPanel DockPanel.Dock="Top" Background="Yellow"></StackPanel>
<StackPanel DockPanel.Dock="Bottom" Background="White" Height="23">
<StatusBar Height="23" Name="MainStatusBar" Width="auto" />
</StackPanel>
<StackPanel DockPanel.Dock="Left" Background="AliceBlue" Width="49" Height="auto"/>
</DockPanel>
</Grid>
</Grid>
你能提供更多的細節嗎?無法錨定它的意義? –