Force Show of Unpinned RadPane

4 posts, 0 answers
  1. Christian Burkhardt
    Christian Burkhardt avatar
    23 posts
    Member since:
    Feb 2010

    Posted 04 May 2011 Link to this post

    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.

  2. Christian Burkhardt
    Christian Burkhardt avatar
    23 posts
    Member since:
    Feb 2010

    Posted 04 May 2011 Link to this post

    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.
  3. DevCraft banner
  4. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 20 Jul 2011 Link to this post

    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.

  5. Christian Burkhardt
    Christian Burkhardt avatar
    23 posts
    Member since:
    Feb 2010

    Posted 22 Jul 2011 Link to this post


    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.
Back to Top