Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

New Post: [Version 2.0] NullRef when setting IsSelected for Document

$
0
0

Hey,

when dual binding the IsSelected property of a LayoutItem, a null ref exception is thrown inside the changed callback method.

 

     /// <summary>
        /// Provides derived classes an opportunity to handle changes to the IsSelected property.
        /// </summary>
        protected virtual void OnIsSelectedChanged(DependencyPropertyChangedEventArgs e)
        {
            if (_isSelectedReentrantFlag.CanEnter)
            {
                using (_isSelectedReentrantFlag.Enter())
                {
                    LayoutElement.IsSelected = (bool)e.NewValue;
                }
            }
        }

The property LayoutElement is not set.

Regards

Alex


Viewing all articles
Browse latest Browse all 2690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>