Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect rendering with SizeToContent="WidthAndHeight" #153

Closed
rhunen opened this issue Aug 19, 2015 · 1 comment
Closed

Incorrect rendering with SizeToContent="WidthAndHeight" #153

rhunen opened this issue Aug 19, 2015 · 1 comment
Assignees
Milestone

Comments

@rhunen
Copy link

rhunen commented Aug 19, 2015

I am trying to modify the RibbonWindowWithoutRibbon example to create auto sizing dialogs that have the same window style as the main window. It appears that rendering is incorrect when SizeToContent="WidthAndHeight".

Here is a code example that can be used to reproduce the issue in the FluentTest application:

<fluent:RibbonWindow x:Class="FluentTest.RibbonWindowWithoutRibbon"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:fluent="urn:fluent-ribbon"
                     Title="RibbonWindowWithoutRibbon"
                     SizeToContent="WidthAndHeight">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <fluent:Ribbon Grid.Row="0" IsMinimized="True"
                       IsAutomaticCollapseEnabled="False"
                       IsCollapsed="True"
                       IsQuickAccessToolBarVisible="False"
                       CanCustomizeQuickAccessToolBar="False"
                       CanCustomizeRibbon="False"
                       CanQuickAccessLocationChanging="False"
                       ContentGapHeight="2" />
        <Border Grid.Row="1" Width="400" Height="400" BorderThickness="10" BorderBrush="Red"/>
    </Grid>
</fluent:RibbonWindow>

The image shows the rendering result:

fluentribbonrendererror

Notice the black areas at the right and at the bottom. The black areas turn white as soon as you start to resize the Window. Width and height remain wrong though.

There are no rendering artifacts with SizeToContent="Width" or SizeToContent="Height" (but then height/width is of course not as desired).

Regards,
-Roger

@batzen
Copy link
Member

batzen commented Aug 20, 2015

I am very busy right now. Will have a look at this next week, at least I hope so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants