我正在關注教程here。 這裏是我的XAML代碼:色帶窗口上的多餘空格
<Window x:Class="warm6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Ribbon x:Name="RibbonWin">
<!-- help icon on the right side -->
<Ribbon.HelpPaneContentTemplate>
<DataTemplate>
<RibbonButton SmallImageSource="images\help.png" />
</DataTemplate>
</Ribbon.HelpPaneContentTemplate>
<Ribbon.ApplicationMenu>
<RibbonApplicationMenu SmallImageSource="images\window.png">
<RibbonApplicationMenuItem Header="Open" ToolTipTitle="Application Menu"
ImageSource="images\window2.png"/>
<RibbonApplicationMenuItem Header="_Save"
ImageSource="images\save.png"/>
<RibbonSeparator/>
<RibbonApplicationMenuItem Header="_Close" ImageSource="images\close.png"/>
<RibbonApplicationMenu.AuxiliaryPaneContent>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="5" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<RibbonSeparator Grid.Row="0" Label="Recently Templates" />
</Grid>
</RibbonApplicationMenu.AuxiliaryPaneContent>
</RibbonApplicationMenu>
</Ribbon.ApplicationMenu>
<RibbonTab>
</RibbonTab>
</Ribbon>
</Grid>
</Window>
我發現有多餘的空間,我區窗口上面,像這樣:
請幫助我提高了!
嘗試設置'VerticalAlignment = 「評出的」'你的絲帶。 – Nitesh
嘗試過,但沒有效果。 – prehistoricpenguin
僅用於檢查爲功能區和窗口設置不同的背景,並查看此空間屬於哪個控件。 – Nitesh