This is a migrated thread and some comments may be shown as answers.

Force Show of Unpinned RadPane

3 Answers 228 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Christian Burkhardt
Top achievements
Rank 1
Christian Burkhardt asked on 04 May 2011, 01:18 PM
Hi, 

I have the following:

<telerikDocking:RadSplitContainer InitialPosition="DockedLeft" MinWidth="330">
    <telerikDocking:RadPaneGroup x:Name="myRadPaneGroup">
      <telerikDocking:RadPane CanUserClose="False" >
           <!-- Some Content Here -->
      </telerikDocking:RadPane>
 
      <telerikDocking:RadPane x:Name="PANE2" Header="Header"
        TitleTemplate="{StaticResource TitleTemplate}"
                  CanUserClose="False" IsPinned="False" AutoHideWidth="800" >
          <!-- Some other content here -->
      </telerikDocking:RadPane>
      </telerikDocking:RadPaneGroup>
  </telerikDocking:RadSplitContainer>

As you can see, PANE2 is collapsed into the auto-hide area in the beginning.
I want to un-collapse it programatically like this:
When user presses some button on a toolbar un-collapse it just like when the user would be clicking the auto-hide area button.

How can I do this? I tried ShowAllPanes on the containing RadPaneGroup but that doesn't work.
Also I do not want to pin the pane I'm showing.
I just want it to unslide, and when user changes focus to some other element, to be hidden.

3 Answers, 1 is accepted

Sort by
0
Christian Burkhardt
Top achievements
Rank 1
answered on 04 May 2011, 01:31 PM
I've found the solution here: http://www.telerik.com/community/forums/silverlight/dockpanel/expanding-an-autohidden-collapsed-radpane-dynamically.aspx

Looks like all I have to do is say: PANEL2.Focus(). This will unslide-it and still keep it unpinned.
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 20 Jul 2011, 10:17 AM
Hi Christian and Telerik team,

I had similar situation and have no luck with Pane.Focus().
As for my things, I used PRISM and RadDock in main shell,but RadDock is not friendly with PRISM region,
and I use following code to activate exisiting view in RadDock. However, when view is unpinned and collapsed,
don't know how to set the view slided and shown but as unpinned such as mouse-hovered ont the view.
public bool ActivatePane(string viewName)
       {
           var pane = this.ChildrenOfType<Telerik.Windows.Controls.RadPane>().Where(k => k.Name.Equals(viewName)).SingleOrDefault();
           if (pane == null)
               return false;
           // activate and notify to vm
           if (pane.IsHidden)
               pane.IsHidden = false;
           if (!pane.IsPinned)
           {
               // no effect....
               // pane.Focus();
               // use as pinned untill find the way to do sliding
               pane.IsPinned = true;
           }
           // else
           pane.IsSelected = true;
           // vm be notified active
           BaseView view = pane.Content as BaseView;
           if (view != null)
           {
               IActiveAware iactive = view.DataContext as IActiveAware;
               if (iactive != null)
                   iactive.IsActive = true;
           }
           return true;
       }

Christian,your metioned link looks broken. Would you let me know again ?

Thanks in advance.

Kang.

0
Christian Burkhardt
Top achievements
Rank 1
answered on 22 Jul 2011, 11:19 AM

All I had was an initially collapsed pane like this:

            <telerik:RadPane x:Name="openTemplatePane"
                                    CanUserClose="False"
                                    CanUserPin="False"
                                    CanFloat="False"
                                    IsPinned="False"
                                    AutoHideWidth="800"
                                    IsEnabled="True">
then when the users presses a button on the toolbar I did: openTemplatePane.Focus() and it did the trick.
This worked with the Q1 2011 release. Since then I did not need that code anymore, so don't know if it would work with Q2 2011 release. 

I suggest you try it in a simple project (without prism) and using Q1 2011 release and then in Q2 2011 to see if there's a bug in the new release or to see if PRISM is the problem.
Tags
Docking
Asked by
Christian Burkhardt
Top achievements
Rank 1
Answers by
Christian Burkhardt
Top achievements
Rank 1
Yonggu Kang
Top achievements
Rank 1
Iron
Share this question
or