2012-10-09 49 views
8

我正在爲我的應用程序使用System.Windows.Controls.Ribbon庫。一切工作都非常好,除非我最大化窗口開始脫離屏幕。WPF功能區:最大化窗口關閉屏幕

我也注意到,與其他WPF應用程序,但當您使用RibbonWindow它變得更糟。

enter image description here

下面是我的源代碼(沒有什麼真正令人興奮的,我認爲):

<RibbonWindow 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     x:Class="WpfApplication1.MainWindow" 
     Title="TestWindow" Height="350" Width="525" Background="LightSteelBlue"> 

    <Grid> 
     <Grid.RowDefinitions> 
      <RowDefinition Height="Auto"/> 
      <RowDefinition Height="*"/> 
     </Grid.RowDefinitions> 

     <Ribbon Grid.Row="0"> 
      <RibbonTab x:Name="TestRibbon" Header="TestRibbon"> 
       <RibbonGroup> 
        <RibbonButton x:Name="TestButton" Label="Button" LargeImageSource="traffic_lights_green.png" /> 
       </RibbonGroup> 
      </RibbonTab> 
     </Ribbon> 

     <ContentControl Grid.Row="1"> 
     </ContentControl> 
    </Grid> 
</RibbonWindow> 

是否有某種方式來阻止這樣的窗口?

+4

見http://stackoverflow.com/a/12567883/183367是否有幫助。 –

+1

微軟錯誤:http://connect.microsoft.com/VisualStudio/feedback/details/775972/wpf-ribbon-window-the-border-is-too-thin – jbe

+0

只需使用http://fluent.codeplex.com/使用起來更加方便,甚至beta版本也適用於我們的多個生產應用程序 – Staeff

回答

0

只是讓你知道我如何「解決」這一點。我正在使用Fluent Ribbon api。這對我來說效果更好,您也可以獲得Office 2010樣式。

但我強烈建議您下載源代碼並自己編譯它,因爲上一個穩定版本是前一陣子,但它仍在開發中,開發人員對錯誤進行了非常快速的響應。

http://fluent.codeplex.com/