private static void OnRadiusChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Panorama panorama = d as Panorama; int oldValue = (int)e.OldValue; int newValue = (int)e.NewValue; if (oldValue != newValue && panorama._hasInitializedComponet) { int layerLevel = panorama.GetLayerLevelByFieldOfView(); panorama.UpdateLayer(layerLevel); } }
private static void OnRangeOfFieldOfViewChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Panorama panorama = d as Panorama; double oldValue = (double)e.OldValue; double newValue = (double)e.NewValue; if (oldValue != newValue) { panorama.UpdateAngleRangePerLayer(); if (panorama._hasInitializedComponet) { int layerLevel = panorama.GetLayerLevelByFieldOfView(); if (panorama.CanChangeLayer(layerLevel)) { panorama.UpdateLayer(layerLevel); } } } }