开发者

Silverlight: Hiding RadPaneGroup problem

Hi i am facing a very strange problem.

My requirement is to have a tree on the left hand side of a page a view on the right hand side of the page. Clicking various nodes of the tree shows different views.

I have implemented this using two rad pane groups. Now i have implemented all the logic and the tree开发者_高级运维 nodes hide or show the desired RadPaneGroup, so i am going on the right path.

But the problem is that when the page initially loads both Pane Groups are shown. I want to have one initially hidden. The second RadPane Group visibility is collapsed but it still shows up. How do i hide one of the rad pane group initially.

Kind Regards,

  <telerik:RadDocking Grid.Row="2" AllowUnsafeMode="True"  BorderThickness="0" Background="#F2F2F3" HasDocumentHost="True" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="radDocking1" VerticalAlignment="Stretch">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer InitialPosition="FloatingDockable">
                    <telerik:RadPaneGroup Background="#F2F2F3" Name="redemptionAssignmentViewPaneGroup" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerik:ProportionalStackPanel.RelativeSize="400, 200" >
                        <telerik:RadPane  Header="Assignment View" CanUserClose="False">
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup Visibility="Collapsed" Background="#F2F2F3" Name="redemptionBacthViewPaneGroup" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerik:ProportionalStackPanel.RelativeSize="400, 200" BackgroundVisibility="Collapsed">
                        <telerik:RadPane  Header="Assignment View" CanUserClose="False">
                        </telerik:RadPane>
                        <telerik:RadPane  Header="Assignment View" CanUserClose="False">
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
            <telerik:RadSplitContainer InitialPosition="DockedLeft" Width="210">
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Redemption Center Center" CanDockInDocumentHost="True" CanUserClose="False" PaneHeaderVisibility="Visible">
                        <my:RedemptionTreeView VerticalAlignment="Stretch" x:Name="redemptionTree"/>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>


Telerik said :

The RadPaneGroup control changes its Visibility property automatically when its visible panes vary. If you want to make a RadPaneGroup invisible you just need to make all its panes hidden (to set their IsHidden property to true). As the RadPaneGroup uses its Visibility property internally you shouldn't change it yourself.

RadPanelGroup and Visibility collapsed not working

So you need to hide each of the RadPane in the RadPaneGroup to hide the RadPaneGroup :

<telerik:RadPaneGroup Background="#F2F2F3" Name="redemptionBacthViewPaneGroup" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerik:ProportionalStackPanel.RelativeSize="400, 200" BackgroundVisibility="Collapsed">
    <telerik:RadPane IsHidden="True" Header="Assignment View" CanUserClose="False">
    </telerik:RadPane>
    <telerik:RadPane IsHidden="True" Header="Assignment View" CanUserClose="False">
    </telerik:RadPane>
</telerik:RadPaneGroup>

You could also do code behind :

myRadPaneGroup.HideAllPanes();

Hiding All Panes Documentation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜