RadPane IsHidden binding doesn't hide all panes when in RadPaneGroup

2 posts, 0 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 05 Feb 2014 Link to this post

    Hi,

    I'm having trouble with the IsHidden binding of my RadPanes. If I have 2 or more RadPanes within a RadPaneGroup and have their IsHidden properties bound to a static class boolean property, only 1 of the multiple panes within the RadPane group hides when I toggle the property from false to true.

    All IsHidden bindings are working, there appears to be a bug when toggling the binding on more than one RadPane within a RadPaneGroup. 

    I'm using library 2013.1.220.40.


    XAML Example:
    <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
           <telerikDocking:RadPaneGroup>
     
               <!-- Modification Pane -->
                <TAS2DockingPanes:ModificationsPane x:Name="radPaneModifications" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewModificationsPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
     
                <!-- Pricing Pane -->
                 <TAS2DockingPanes:ExtrasPricingPane x:Name="radPanePricingExtras" CanUserClose="False" CanDockInDocumentHost="False" IsHidden="{Binding Source={x:Static TAS2DockingPanes:VisibilitySettings.Instance}, Path=CanViewExtrasPricingPane, Converter={StaticResource boolToReverseConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
     
             </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>


    Static Class
    public class VisibilitySettings : INotifyPropertyChanged
    {
        private static readonly VisibilitySettings instance = new VisibilitySettings();
        private VisibilitySettings() { }
     
     
        public static VisibilitySettings Instance
        {
            get
            {
                return instance;
            }
        }
     
     
        private static bool m_canViewExtrasPricingPane;
        private static bool m_canViewModificationsPane;
     
     
     
        public static void SetVisibilitySettings(bool canViewExtrasPricingPane, bool canViewModificationsPane)
        {
            Instance.CanViewExtrasPricingPane = canViewExtrasPricingPane;
            Instance.CanViewModificationsPane = canViewModificationsPane;
        }
     
        public bool CanViewExtrasPricingPane
        {
            get
            {
                return m_canViewExtrasPricingPane;
            }
            set
            {
                m_canViewExtrasPricingPane = value;
                OnPropertyChanged(new PropertyChangedEventArgs("CanViewExtrasPricingPane"));
            }
        }
     
     
        public bool CanViewModificationsPane
        {
            get
            {
                return m_canViewModificationsPane;
            }
            set
            {
                m_canViewModificationsPane = value;
                OnPropertyChanged(new PropertyChangedEventArgs("CanViewModificationsPane"));
            }
        }
     
     
        //INotifyPropertyChanged Event
        public event PropertyChangedEventHandler PropertyChanged;
        public void OnPropertyChanged(PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, e);
        }
     
    }


    Has anyone else noticed such behaviour?


    Many thanks,

    Rob
  2. George
    Admin
    George avatar
    1332 posts

    Posted 06 Feb 2014 Link to this post

    Hello Rob,

    I tried to reproduce the problem in a sample project, but to no avail. Could you take a look and let me know if I missed anything? When close a pane, all panes in the group goes hidden as well. 

    I am glad to assist you further.


    Regards,
    George
    Telerik

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top