This project is read-only.

Problem with ViewBoxes when deriving from RibbonWindow

Apr 4, 2012 at 12:46 PM

I try to evaluate Fluent.Ribbon for my application and at the moment I have many problems. It's not always so easy to reproduce these problems with small test applications, but here is one:

Simple Example:

<Fluent:RibbonWindow x:Class="FluentRibbonTest.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"
    xmlns:System="clr-namespace:System;assembly=mscorlib" 
        Title="MainWindow" Height="600" Width="800">
    <DockPanel>
        <Fluent:Ribbon DockPanel.Dock="Top">
            <Fluent:RibbonTabItem>
            </Fluent:RibbonTabItem>
        </Fluent:Ribbon>
        <Grid>
            <Viewbox >
                <TextBlock>Text to display</TextBlock>
            </Viewbox>
        </Grid>
    </DockPanel>
</Fluent:RibbonWindow>

Is seems that the TextBlock is drawn with a very low resolution and then zoomed to fit the free space.

If I make my MainWindow derive from System.Windows.Window the problem is gone and the TextBlock is drawn very accurate.