private static void DisplayModeProperty_Changed( DependencyObject d, DependencyPropertyChangedEventArgs e) { var self = (NavigationView)d; self.EnterCurrentDisplayModeVisualState(); var eventData = new NavigationViewDisplayModeChangedEventArgs( (NavigationViewDisplayMode)e.OldValue, (NavigationViewDisplayMode)e.NewValue); self.OnDisplayModeChanged(eventData); }
/// <summary> /// Raises the <see cref="DisplayModeChanged"/> event. /// </summary> /// <param name="e">Event data for the changed event.</param> protected virtual void OnDisplayModeChanged(NavigationViewDisplayModeChangedEventArgs e) { DisplayModeChanged?.Invoke(this, e); }