amwx / FluentAvalonia

Control library focused on fluent design and bringing more WinUI controls into Avalonia
MIT License
1.05k stars 97 forks source link

Frame.Navigate() doesn't work on Linux #483

Closed NotroDev closed 1 year ago

NotroDev commented 1 year ago

Describe the bug Hi. I created a Window with:

<ui:Frame Name="FrameView">
    <sv:HomePage/>
</ui:Frame>

It works well on any system. The problem is with Navigate(). In HomePage, I have a button and Command associated to it:

PersonalizationItem.Command = new RelayCommand(() =>
{
    SettingsWindow.Instance.FrameView.Navigate(typeof(PersonalizationPage), null, new EntranceNavigationTransitionInfo());
});

It works perfectly on Windows, but on Linux, nothing happens. When I have an empty Frame, and I put a FrameView.Navigate(typeof(HomePage)) in SettingsWindow's constructor, it works on Windows, but on Linux there is an empty window.

Desktop/Platform (please complete the following information):

sccombp commented 1 year ago

I ran into the same issue when I updated to the latest version of Avalonia (11)

try the following code


PersonalizationItem.Command = new RelayCommand(() =>
{
        var navOpt = new FrameNavigationOptions() { TransitionInfoOverride = new EntranceNavigationTransitionInfo() };
    SettingsWindow.Instance.FrameView.NavigateToType(typeof(PersonalizationPage), null, navOpt);
});
`
NotroDev commented 1 year ago

I ran into the same issue when I updated to the latest version of Avalonia (11)

try the following code

PersonalizationItem.Command = new RelayCommand(() =>
{
        var navOpt = new FrameNavigationOptions() { TransitionInfoOverride = new EntranceNavigationTransitionInfo() };
  SettingsWindow.Instance.FrameView.NavigateToType(typeof(PersonalizationPage), null, navOpt);
});
`

Hey, thanks for your reply! It doesn't work for me :/ The same problem, nothing happens (works on Windows).

NotroDev commented 1 year ago

For some reason, it works now (I think). Maybe it was because of using VM.