Kinnara / ModernWpf

Modern styles and controls for your WPF applications
MIT License
4.45k stars 446 forks source link

Frame's property - "ContentTransitions" #501

Open DmitryYalchik opened 2 years ago

DmitryYalchik commented 2 years ago

My code in XAML:

<ui:Frame ContentTransitions="{Binding TransitionsAnimate}">

My code in ViewModel:

public MainViewModel()
        {
            TransitionsAnimate = new SuppressNavigationTransitionInfo();
        }

        private NavigationTransitionInfo? _transitionsAnimate;
        public NavigationTransitionInfo? TransitionsAnimate
        {
            get
            {
                return _transitionsAnimate;
            }
            set
            {
                _transitionsAnimate = value;
                RaisePropertyChanged(nameof(TransitionsAnimate));
            }
        }

But this doesn't working... I don't understand why... Help me, please, i wanna make "Suppress" animation

DmitryYalchik commented 2 years ago

This also doesn't working...

<ui:Frame Source="{Binding CurrentPage, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
            <ui:Frame.ContentTransitions >
                <ui:NavigationThemeTransition>
                    <ui:SuppressNavigationTransitionInfo/>
                </ui:NavigationThemeTransition>
            </ui:Frame.ContentTransitions>
        </ui:Frame>
Yue-cn commented 1 year ago
  <ui:Frame.ContentTransitions>
      <ui:TransitionCollection>
          <ui:NavigationThemeTransition>
              <ui:DrillInNavigationTransitionInfo/>
          </ui:NavigationThemeTransition>
      </ui:TransitionCollection>
  </ui:Frame.ContentTransitions>

Try it?