This project is read-only.

RibbonWindow SizeToContent="WidthAndHeight"

Apr 22, 2010 at 7:26 PM

Hello,

when setting the SizeToContent to WidthAndHeight the RibbonWindow sizes to full screen width instead of the size of the controls. 

I load usercontrols dynamically into a ribbonwindow which should size accordingly to the controls width. Binding is not an option because the control itself sizes dynamically to its content.

Simple Code to reproduce:

<fluent:RibbonWindow x:Class="WpfApplication5.MainWindow"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
        Title="MainWindow" SizeToContent="WidthAndHeight">
    <DockPanel>
        <fluent:Ribbon DockPanel.Dock="Top">
            <fluent:RibbonTabItem Header="testtab">
                <fluent:RibbonGroupBox Header="testgroup">
                    <fluent:Button>test</fluent:Button>
                </fluent:RibbonGroupBox>
            </fluent:RibbonTabItem>
        </fluent:Ribbon>
        <Grid>
            <TextBox Width="100">abc</TextBox>
        </Grid>
    </DockPanel>
</fluent:RibbonWindow>

(WPF4)

Dec 5, 2012 at 12:06 PM

Did you ever find a solution to this? i'm experiencing the same behavior...