Hide RadSplitContainer in runtime

3 posts, 0 answers
  1. Zvi
    Zvi avatar
    16 posts
    Member since:
    Sep 2014

    Posted 07 Oct Link to this post

    Hello,

    Attached a v.s 2015 WPF code developed with last trial version of Telerik: 

    In Xaml, the splitter is set to : IsVisible = "Hidden"

    In the cs code, IsVisible returns false. 

    But when the application runs, the splitter is shown.

    Can you help ?

    Thank you,

    Zvika 

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
     
    namespace TelerikWpfApp1
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            public MainWindow()
            {
                InitializeComponent();
                bool rc=radSplitContainer.IsVisible;
            }
        }
    }
    <Window x:Class="TelerikWpfApp1.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    Title="MainWindow" Height="350" Width="525">
            <Grid>
            <telerik:RadDocking x:Name="radDocking">
                <telerik:RadSplitContainer x:Name="radSplitContainer" Visibility="Hidden">
                    <telerik:RadPaneGroup x:Name="radPaneGroup">
                        <telerik:RadPane x:Name="radPane1" Header="Document 1">
                            <TextBlock Text="Some simple text here"></TextBlock>
                        </telerik:RadPane>
                        <telerik:RadPane x:Name="radPane2" Header="Document 2">
                            <TextBlock Text="Some simple text here"></TextBlock>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>
        </Grid>
    </Window>
  2. Dinko
    Admin
    Dinko avatar
    458 posts

    Posted 11 Oct Link to this post

    Hi Zvi,

    Thank you for your interest in RadDocking.

    The default value of the IsVisible property of the RadSplitContainer is false.  Basically, the RadSplitContainer is an ItemsControl and it is not visually represented. Can you elaborate more on your approach? Which part from the RadSplitContainer are you trying to hide?

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Zvi
    Zvi avatar
    16 posts
    Member since:
    Sep 2014

    Posted 11 Oct in reply to Dinko Link to this post

    Hello,

    Solved by using IsHidden.

    Thank you,

    Zvika 

    <telerik:RadSplitContainer InitialPosition="FloatingOnly">
                        <telerik:RadPaneGroup>
                            <telerik:RadPane CanUserClose="False" CanUserPin="False" x:Name="PciViewPane" IsHidden="true">
                                <local:PciView x:Name="pciView"/>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
Back to Top