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
1735
Interaction Trigger not working within ButtonTool
posted

I am trying to add an Interaction Trigger to a ButtonTool, but it is not working. I don't get any errors on the Output window when I run my solution, but it doesn't do anything either.

1.- I have a Ribbon Window with a Ribbon and a Dock Manager

2.- I’m trying to use the Interaction triggers on a Button Tool to collapse a Split Pane 

                      <igWpf:ButtonTool Caption="Framework" 

                                          x:Name="FrameworkButton"

                                LargeImage="{DynamicResource Image_PlaceHolder32}" 

                                Style="{DynamicResource StandardHighPriority}">

                            <i:Interaction.Triggers>

                                <i:EventTrigger EventName="PreviewMouseLeftButtonDown">

                                    <ei:GoToStateAction StateName="FrameworkCollapsed"/>

                                </i:EventTrigger>

                            </i:Interaction.Triggers>

                        </igWpf:ButtonTool>

     3. - The Interaction Trigger is calling a Visual State that is presented at the Ribbon Level and the Visual State is targeting the Split Pane (RightPaneProperties) in the Dock Manager

<!-- Visual States -->

<VisualStateManager.VisualStateGroups>
   <VisualStateGroup x:Name="VisualStateGroup">
      <VisualState x:Name="FrameworkCollapsed">
         <Storyboard>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="RightPaneProperties">
               <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
         </Storyboard>
      </VisualState>
   </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

<!--DockManager-->

<igDock:XamDockManager>
   <igDock:XamDockManager.Panes>
      <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedRight" Width="300" x:Name="RightPaneProperties">
         <igDock:ContentPane x:Name="bottomEdgeDock1" Header="Framework">
            <local:Framework/>
         </igDock:ContentPane>
      </igDock:SplitPane>
   </igDock:XamDockManager.Panes>

Attached you can find the full xaml. Why is the interaction Trigger not working?

Thank you!


Ribbon Tool Button Interaction Triggers.zip
Parents Reply Children