How to enable Active Files ContextMenu

Docking/MDI for WPF Forum

Posted 11 years ago by sravanthi
Version: 13.1.0582
Avatar

Active Files Context Menu not enabled initially, when performs any action (ex:Float,Close) on document windows makes Active Files Context Menu enables. Followed the same structure as specified in Actipro Samples. Used Prism and MVVM to develop our Project.

Comments (6)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Since those menu items use routed commands, what's probably happening here is that the keyboard focus isn't within a place where the commands can find handlers to be evaluated.  Try focusing an element within your UI tree when your UI is initially loaded.  That should fix it.


Actipro Software Support

Posted 11 years ago by sravanthi
Avatar

Initially when i load  my documentwindow in TabbedMDIContainer my window is already focused. But Active Files Button is not enabled. It just enables when documentwindow Floats that means it enables when any action is occured.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Are you sure that a control within the DockSite has focus?  If the main Window is the thing with focus then the situation you see can happen with WPF commands, even without using our products.


Actipro Software Support

Posted 11 years ago by sravanthi
Avatar
<Grid>
                       
        <docking:DockSite x:Name="dockSite" DockPanel.Dock="Top" CanDocumentWindowsRaft="True">

            <docking:SplitContainer Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

                           <docking:DockingWindow >
                        <docking:DockSite >
                       <ContentControl Height="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Width="Auto" prism:RegionManager.RegionName="{x:Static commonConstant:RegionNames.MainContentRegion}" />
                    </docking:DockSite>
                </docking:DockingWindow>

                          </docking:SplitContainer>
        </docking:DockSite>
            
                   </Grid>

 ContentControl at somepoint we are adding UserControls, and In some cases we need DocumentWindows to get inserted.

Code Follows...

<docking:Workspace>

    <docking:TabbedMdiHost>
        <docking:TabbedMdiContainer Height="Auto" Width="Auto" prism:RegionManager.RegionName="PerformanceRegion" />     </docking:TabbedMdiHost>

</docking:Workspace>

 We are injecting DocumentWindows in this region..

So when they loads that Active Files Button gets visible wen any of the window closes or Floats...

Without ContentControl wen Docksite has direct implementation with Workspace, TabbedMdiHost, TabbedMdiContainer and DocumentWindows,  Active Files button is enabled.

Need Suggestion..

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Part of the problem might be that you can't inject custom controls (like a ContentControl) in the middle of a DockSite hierarchy.  There is a documetnation topic that describes what can be in what.  You might try moving your inner DockSite to within your UserControl instead so that it directly parents the Workspace.

See if that helps.  And if it doesn't, please make a new simple sample project that shows the issue and send that to our support address.  Reference this post in your email and rename the .zip file extension so it doesn't get spam blocked.  Then we'll take a look and see what's going on.


Actipro Software Support

Answer - Posted 11 years ago by sravanthi
Avatar

Thank You for ur reply.It's working fine now.

<docking:DockingWindow>

<ContentControl  prism:RegionManager.RegionName="xxxx "/>

</docking:DockingWindow>

Load below  sample in the Region Name mentioned above ... works fine ..

<docking:Docksite>

<docking:Workspace>

<docking:TabbedMdiHost>

<docking:TabbedMdiContainer>

<docking:DocumentWindow/>

</docking:TabbedMdiContainer>

</docking:TabbedMdiHost>

</docking:Workspace>

</docking:Docksite>

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.