public static void OnIsInScaleRangePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ShowLayersVisibleAtScaleControl conv = d as ShowLayersVisibleAtScaleControl;

            if (conv != null)
            {
                conv.SetTreeViewItemVisibility();
            }
        }
        public static void OnLayerItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ShowLayersVisibleAtScaleControl conv = d as ShowLayersVisibleAtScaleControl;

            if (conv != null && conv.ShowLayersVisibleAtScale)
            {
                conv.SubscribeToPropertyChangedEvent(e.OldValue as ObservableCollection <LayerItemViewModel>, false);
                conv.SetTreeViewItemVisibility();
                conv.SubscribeToPropertyChangedEvent(e.NewValue as ObservableCollection <LayerItemViewModel>, true);
            }
        }