Silverlight:隐藏RadPaneGroup问题

发布于 2024-10-20 09:33:31 字数 2354 浏览 2 评论 0原文

嗨,我面临一个非常奇怪的问题。

我的要求是在页面的左侧有一棵树,在页面的右侧有一个视图。单击树的各个节点会显示不同的视图。

我已经使用两个 rad 窗格组实现了这一点。现在我已经实现了所有逻辑,树节点隐藏或显示所需的 RadPaneGroup,所以我正在走正确的道路。

但问题是,当页面最初加载时,会显示两个窗格组。我想要一个最初隐藏的。第二个 RadPane 组可见性已折叠,但仍然显示。我最初如何隐藏 rad 窗格组之一。

亲切的问候,

  <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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你不是我要的菜∠ 2024-10-27 09:33:31

泰勒里克说:

RadPaneGroup 控件更改了其
可见性属性自动时
它的可见窗格各不相同。如果你想
让 RadPaneGroup 不可见
需要隐藏所有窗格(以
将其 IsHidden 属性设置为 true)。
由于 RadPaneGroup 使用其
您内部的可见性属性
不应该自己改变它。

RadPanelGroup 和可见性折叠不起作用

因此,您需要隐藏 RadPaneGroup 中的每个 RadPane 以隐藏 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>

您也可以在后面执行代码:

myRadPaneGroup.HideAllPanes();

隐藏所有窗格文档

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文