This project is read-only.

VS2012 designer breaks when i add ribbon

May 18, 2013 at 10:13 PM
Hi

i am using a RibbonWindow and once i add a Ribbon to it the designer gives me an NullReferenceException
   at Fluent.Ribbon.OnJustLayoutUpdated(Object sender, EventArgs e)
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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)
this code work great with the designer
<Fluent:RibbonWindow x:Class="Shimshit.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:prism="http://www.codeplex.com/prism"
        xmlns:common="clr-namespace:Shimshit.Common;assembly=Shimshit.Common"
        xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"                    
        Title="שמשית" Height="600" Width="800" Background="{StaticResource TabControlContentBrush}" Margin="10">
<DockPanel LastChildFill="True">
    
    <!--<Fluent:Ribbon DockPanel.Dock="Top" prism:RegionManager.RegionName="{x:Static common:RegionNames.ribbonRegion}">
              <Fluent:Ribbon.Menu>
                <Fluent:Backstage>
                    <Fluent:BackstageTabControl>
                        <Fluent:Button Header="יציאה" Command="{Binding ExitCommand}"/>
                    </Fluent:BackstageTabControl>
                </Fluent:Backstage>
            </Fluent:Ribbon.Menu>
        </Fluent:Ribbon>-->
    


        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Grid.Column="1" Width="5" Margin="3,0,3,0" HorizontalAlignment="Right" Background="DarkGray"/>
            <Expander Grid.Column="0" IsExpanded="True" Template="{StaticResource StretchyExpanderTemp}" OverridesDefaultStyle="True" RenderTransformOrigin="0.5,0.5">

                <!-- Navigation Pane Grid -->
                <Grid x:Name="NavigationPane">

                    <!-- Grid Layout -->
                    <Grid.RowDefinitions>
                        <RowDefinition x:Name="Navigator" Height="*"/>
                        <RowDefinition x:Name="TaskButtons" Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <!-- Navigator Region -->
                    <ContentControl x:Name="NavigatorRegion" Grid.Row="0" Grid.Column="0" prism:RegionManager.RegionName="{x:Static common:RegionNames.navigationRegion}" />

                    <!-- Task Button Region -->
                    <StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,0,0,5">
                        <Border Background="{StaticResource TabControlContentBrush}" BorderBrush="DarkGray" BorderThickness="1" Height="5" Width="Auto" HorizontalAlignment="Stretch" Margin="5,0,5,0"/>
                        <ItemsControl x:Name="TaskButtonRegion" prism:RegionManager.RegionName="{x:Static common:RegionNames.taskButtonRegion}" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
                    </StackPanel>
                </Grid>
            </Expander>

            <!-- Workspace Region-->
            <ContentControl Padding="5" x:Name="WorkspaceRegion" Grid.Column="2" prism:RegionManager.RegionName="{x:Static common:RegionNames.workspaceRegion}"/>
        </Grid>


    </DockPanel>

</Fluent:RibbonWindow>
but once i uncomment the ribbon and the menu i get the exception ... at run time every thing works ok but how can i get the designer to work?
May 18, 2013 at 10:29 PM
I fear this has to be fixed on our side. I will have a look at it tomorrow.
Jun 19, 2013 at 10:15 PM
Nearly forgot this...

Which version of the ribbon are you using?


When i look at the code, there is absolutely no chance for a NullReferenceException in OnJustLayoutUpdated.
Jun 28, 2014 at 10:18 AM
No details....
Marked as answer by batzen on 6/28/2014 at 2:18 AM