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
25
GalleryTool pushing ToolVerticalWrapPanel out of RibbonGroup
posted

I am using the xamRibbon and within one of the RibbonGroups I have a GalleryTool and a ToolVerticalWrapPanel. After upgrading to 10.3 we got the use of the text labels on the gallery items working but there is a weird case where, given certain widths, if you extend the window so that the gallery is only one row then the gallery can start cutting off the ToolVerticalWrapPanel until it is very thin or not visible. Here is the xaml and a screen shot. There also cases where the tools are completely gone. I have tried setting minWidths on the ButtonTools and the ToolVerticalWrapPanel but have not found one that will stop this behavior.

 

   <igRibbon:RibbonGroup Name="ThemeGallery" Caption="Theme Gallery" MaxWidth="500" SmallImage="..\Images\Ribbon\ColorSwatch16.png">
        <igRibbon:RibbonGroup.Variants>
            <igRibbon:GroupVariant Priority="4" ResizeAction="ReduceGalleryPreviewItems"/>
            <igRibbon:GroupVariant Priority="5" ResizeAction="CollapseRibbonGroup"/>
        </igRibbon:RibbonGroup.Variants>
         
        <igRibbon:MenuTool
                                    ShouldDisplayGalleryPreview="True"
                                    LargeImage="..\Images\Ribbon\ColorSwatch32.png"
                                    SmallImage="..\Images\Ribbon\ColorSwatch16.png" >
            <igRibbon:GalleryTool Name="ThemeGalleryTool" Id="themeGallery" ItemBehavior="Button">
 
            </igRibbon:GalleryTool>
        </igRibbon:MenuTool>
        <igRibbon:ToolVerticalWrapPanel>
            <igRibbon:ToggleButtonTool 
                                    Name="tbContinuousTheme" 
                                    Id="" SmallImage="..\Images\Ribbon\Continuous16.png"
                                    igRibbon:RibbonGroup.MaximumSize="ImageOnly"
                                    ToolTip="Continuous Mode" 
                                    KeyTip="MT"
                                    IsEnabled="False"
                                    IsChecked="{Binding Path=IsOnDemandQueryMode, Mode=TwoWay}"/>
            <igRibbon:ButtonTool 
                                            Name="btnNewUserTheme" 
                                            Id="" 
                                            igRibbon:RibbonGroup.MaximumSize="ImageOnly"
                                            SmallImage="..\Images\Ribbon\New16.png" 
                                            IsEnabled="True"
                                            ToolTip="Create New Theme"                
                                            Click="showThemeBuilder" />
            <igRibbon:ButtonTool                                                                                       
                                            SmallImage="..\Images\Ribbon\Load16.png" 
                                            igRibbon:RibbonGroup.MaximumSize="ImageOnly"
                                            IsEnabled="True"
                                            ToolTip="Load Theme"
                                            Click="LoadThemeFromFile"/>
        </igRibbon:ToolVerticalWrapPanel>
    </igRibbon:RibbonGroup>


 

Parents
  • 54857
    Verified Answer
    Offline posted

    You have a MaxWidth set on the group and so that is the maximum size that WPF will allow that element to be. There is no way to know that the 500 desired width was actually because it wanted to be 500 or if it would have wanted to be more so you cannot use that to affect the resizing logic. If you want to constrain the number of preview columns that will be displayed then you should set the MaxPreviewColumns property as needed.

Reply Children
No Data