Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
AllowsTransparency="True" in XamRibbonWindow causes crash in Win8 / Fails in Win7
posted

A client of mine has an application where they are attempting to customize the look of the application, chrome and all. Normally with <Window> you can simply set AllowsTransparecy="True" and WindowStyle="None" and knock yourself out (it's understood that you then have to completely take care of things like resizing, maximize, close, etc. on your own).

Anyway, it appears you cannot set this flag if you use XamRibbonWindow.

Creating a blank WPF app and swapping out the MainWindow.xaml with

<igRibbon:XamRibbonWindow x:Class="WindowTest.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:igRibbon="http://infragistics.com/Ribbon"         Title="MainWindow" Height="350" Width="525" ResizeMode="CanResizeWithGrip" WindowStyle="None"         AllowsTransparency="True">     <igRibbon:RibbonWindowContentHost>     </igRibbon:RibbonWindowContentHost> </igRibbon:XamRibbonWindow>

as well as changing the .cs class to inherit XamRibbonWindow, this crashes with the follow stack trace on Win8

   at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
   at System.Windows.Media.MediaContext.CompleteRender()
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

I'm pushing for not overriding the chrome since the amount of effort involved isn't really worth the ROI, but this is an odd behavior I've been able to reproduce on several different machines.

On Win7, the app won't run at all. You doubleclick and nothing happens.

Is there something I am missing or is this a real issue?