Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Is it possible to control the speed of a NavBarGroup when it expands and collapses? While the default behavior is smooth, it is a bit slow for our application. Thanks.

                                    Greg

                                1 Solution

                                Creation Date Rating Importance Sort by
                                1

                                Hello,

                                You can change the NavBar animation without a problem. Use the View NavBarAnimationOptions.ExpandStoryboard and NavBarAnimationOptions.CollapseStoryboard attached properties:

                                <Window.Resources>
                                     <Storyboard x:Key="collapseStoryboard">
                                          <DoubleAnimation Storyboard.TargetName="PART_DXExpander" Storyboard.TargetProperty="AnimationProgress" To="0" Duration="0:0:0.2"/>
                                     </Storyboard>
                                     <Storyboard x:Key="expandStoryboard">
                                          <DoubleAnimation Storyboard.TargetName="PART_DXExpander" Storyboard.TargetProperty="AnimationProgress" To="1" Duration="0:0:0.5"/>
                                     </Storyboard>
                                </Window.Resources>
                                ...
                                <dxn:ExplorerBarView dxn:NavBarAnimationOptions.ExpandStoryboard="{DynamicResource expandStoryboard}" dxn:NavBarAnimationOptions.CollapseStoryboard="{DynamicResource collapseStoryboard}"/>
                                ...

                                Thank you, Marina

                                Show all comments
                                • GE Software Procurement 11.18.2009

                                  Thanks!

                                • Welcome!

                                • Josh Williams 4 12.06.2016
                                  I know this is very old, but this does not work for me. The animation is still slow. The only difference is my <dxn:NavBarControl> is in a UserControl. So I used UserControl.Resources and did the same thing. The animation is still slow though.
                                • Hi Josh,
                                  To help us diagnose the issue, please clarify what view type (ExplorerBarView, NavigationPaneView, or SideBarView) you are using. If you are using a non-default theme (starting with version 16.1, it's Office2016White; in previous versions, the default theme is DeepBlue), specify the theme name.
                                  In addition, let us know what content is displayed in your groups: regular items or custom content.
                                  Finally, to make sure that we test the same version, let us know what DevExpress version you are using. You can check an accurate version (including the hotfix number) in the Debug->Windows->Modules window when debugging your project.

                                • Yoni Avital 1 01.20.2017
                                  Hiya,

                                  Jumping on thread as I have the same issue/request from users. I am using version 16.1

                                  My code is:

                                  <UserControl x:Class="LaunchPad.UI.Views.DeskApps.DeskAppsView"
                                               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                                               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                               xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
                                               xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
                                               xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
                                               mc:Ignorable="d"
                                               d:DesignHeight="300" d:DesignWidth="300">


                                      <UserControl.Resources>


                                          <Style x:Key="RoundCornerButton" TargetType="{x:Type Button}">


                                              <Setter Property="HorizontalContentAlignment" Value="Left" />
                                              <Setter Property="VerticalContentAlignment" Value="Center" />
                                              <Setter Property="Padding" Value="1" />


                                              <Setter Property="Template">
                                                  <Setter.Value>


                                                      <ControlTemplate TargetType="{x:Type Button}">


                                                          <Grid x:Name="grid">


                                                              <Border x:Name="border" BorderThickness="2">
                                                                  <ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Bottom"
                                                                                    TextElement.FontWeight="Bold" Width="75" Height="75" />
                                                              </Border>


                                                          </Grid>


                                                          <ControlTemplate.Triggers>


                                                              <Trigger Property="IsMouseOver" Value="True">
                                                                  <Setter Property="BorderBrush" TargetName="border" Value="DarkOrange" />
                                                              </Trigger>


                                                              <Trigger Property="IsEnabled" Value="False">
                                                                  <Setter Property="Opacity" TargetName="grid" Value="0.25" />
                                                              </Trigger>


                                                          </ControlTemplate.Triggers>


                                                      </ControlTemplate>


                                                  </Setter.Value>
                                              </Setter>
                                          </Style>


                                          <Storyboard x:Key="collapseStoryboard">
                                              <DoubleAnimation Storyboard.TargetName="PART_DXExpander" Storyboard.TargetProperty="AnimationProgress" To="0" Duration="0:0:0.1"/>
                                          </Storyboard>
                                          
                                          <Storyboard x:Key="expandStoryboard">
                                              <DoubleAnimation Storyboard.TargetName="PART_DXExpander" Storyboard.TargetProperty="AnimationProgress" To="1" Duration="0:0:0.1"/>
                                          </Storyboard>
                                          
                                      </UserControl.Resources>


                                      <Grid>


                                          <Grid.RowDefinitions>
                                              <RowDefinition Height="*" />
                                          </Grid.RowDefinitions>


                                          <DockPanel Grid.Row="0">


                                              <dxn:NavBarControl Name="NavBarControl" Margin="5,10">
                                                     
                                                  <dxn:NavBarControl.Groups>


                                                      <dxn:NavBarGroup Header="Desk" DisplaySource="Content" Content="{Binding Applications}"
                                                                       dxn:NavBarAnimationOptions.ExpandStoryboard="{DynamicResource expandStoryboard}" 
                                                                       dxn:NavBarAnimationOptions.CollapseStoryboard="{DynamicResource collapseStoryboard}">
                                                          
                                                          <dxn:NavBarGroup.ContentTemplate>
                                                              
                                                              <DataTemplate>
                                                                  
                                                                  <dxlc:FlowLayoutControl x:Name="MarketDataFlowLayoutControl" Orientation="Horizontal" ItemsSource="{Binding}">
                                                                      
                                                                      <dxlc:FlowLayoutControl.ItemTemplate>
                                                                          
                                                                          <DataTemplate>
                                                                              
                                                                              <Button HorizontalAlignment="Left" Style="{DynamicResource RoundCornerButton}">
                                                                                  
                                                                                  <dxmvvm:Interaction.Behaviors>
                                                                                      <dxmvvm:EventToCommand PassEventArgsToCommand="True"
                                                                                                     Command="{Binding ClickCommand}" EventName="Click" />
                                                                                  </dxmvvm:Interaction.Behaviors>


                                                                                  <StackPanel Background="{Binding Background}" Orientation="Vertical" ToolTip="{Binding Path}">
                                                                                      <Image Source="{Binding IconPath}" 
                                                                                         Margin="0,10" 
                                                                                         VerticalAlignment="Center"
                                                                                         Height="32" 
                                                                                         Width="32" />
                                                                                      <TextBlock Text="{Binding Name}" 
                                                                                             Margin="0,5" 
                                                                                             TextAlignment="Center"
                                                                                             VerticalAlignment="Center" Width="75" />
                                                                                  </StackPanel>
                                                                                  
                                                                              </Button>
                                                                              
                                                                          </DataTemplate>
                                                                          
                                                                      </dxlc:FlowLayoutControl.ItemTemplate>
                                                                      
                                                                  </dxlc:FlowLayoutControl>
                                                          
                                                              </DataTemplate>
                                                      
                                                          </dxn:NavBarGroup.ContentTemplate>


                                                      </dxn:NavBarGroup>
                                                      
                                                  </dxn:NavBarControl.Groups>
                                                  
                                              </dxn:NavBarControl>


                                          </DockPanel>


                                      </Grid>


                                  </UserControl>

                                  Again, like Josh, nothing happens when I change expand/collapse duration to:  Duration="0:0:0.1"

                                  Any assitance will be much appreciated.

                                  This is on version 16.1 WPF
                                  Thanks
                                  Yoni
                                • Hello Yoni,

                                  I have just answered your question in the context of the NavBarGroup - Control Collapse/Expand Speed thread. Please take a moment to review it.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners