RibbonWindow opened from full trust XBap

Jan 16, 2009 at 5:51 PM
The RibbonWindow seems to do some really strange things when opened from a full trust XBap. The close, minimize and maximize buttons are not there, the window is not draggable and the blue from the Ribbon control goes all the way up into the header so the white text is unreadable.
Coordinator
Jan 16, 2009 at 6:26 PM
Edited Jan 16, 2009 at 6:27 PM
The RibbonWindow is not meant to be used inside xbaps.  It hooks pretty low level window messages and can't do that inside a browser. So I imagine that is why you are seeing strange behavior.  Inside xbaps the normal way to use ribbon would be inside a page.

Do you have a screenshot or something that shows a little better the exact behavior?
Jan 20, 2009 at 12:42 PM
Edited Jan 20, 2009 at 12:46 PM
I'm talking about a new window opened from a full-trust xbap. The RibbonWindow itself looks good, it's just when you throw the Ribbon on there that the Ribbon doesn't look correct. Also, every time I close the xbap I get an iexplore.exe Application Error - The memory could not be "read". That's when I close the newly opened window, then the main Internet Explorer window.
This is very easy to reproduce...

Example code:
Assume Page1 is the StartupUri for the XBAP.
Page1.xaml.cs:
        public Page1() {
            InitializeComponent();
            (new Window1()).Show();
        }

Window1.xaml:
<ribbon:RibbonWindow x:Class="TestDataGrid.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="600" Width="600"
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary">
    <Grid>
        <ribbon:Ribbon Title="Test"/>
    </Grid>
</ribbon:RibbonWindow>

Also, here's a screenshot
Jan 20, 2009 at 1:53 PM
Ignore the Error part - I seem to be getting this when all vs2008 xbaps close now.