mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Workshop - Feature flagged out layouts
Settings - Use Fluent tabs
This commit is contained in:
1 parent
0ac973d4bc
commit
a798980eec
14 files changed
+70
-35
No files matched your search
@@ -8,20 +8,25 @@
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Artemis.UI.Screens.Settings.SettingsView"
|
||||
x:DataType="settings:SettingsViewModel">
|
||||
<Border Classes="router-container">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<TabStrip Grid.Row="0" Margin="12" ItemsSource="{CompiledBinding SettingTabs}" SelectedItem="{CompiledBinding SelectedTab}">
|
||||
<TabStrip.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{CompiledBinding Name}" />
|
||||
</DataTemplate>
|
||||
</TabStrip.ItemTemplate>
|
||||
</TabStrip>
|
||||
<controls:Frame Grid.Row="1" Name="TabFrame" IsNavigationStackEnabled="False" CacheSize="0">
|
||||
<controls:Frame.NavigationPageFactory>
|
||||
<ui:PageFactory/>
|
||||
</controls:Frame.NavigationPageFactory>
|
||||
</controls:Frame>
|
||||
</Grid>
|
||||
</Border>
|
||||
<controls:NavigationView PaneDisplayMode="Top"
|
||||
MenuItemsSource="{CompiledBinding SettingTabs}"
|
||||
SelectedItem="{CompiledBinding SelectedTab}"
|
||||
IsBackEnabled="True"
|
||||
IsBackButtonVisible="True"
|
||||
IsSettingsVisible="False"
|
||||
BackRequested="NavigationView_OnBackRequested">
|
||||
<controls:NavigationView.Styles>
|
||||
<Styles>
|
||||
<Style Selector="controls|NavigationView:topnavminimal /template/ SplitView Border#ContentGridBorder">
|
||||
<Setter Property="CornerRadius" Value="8 0 0 0" />
|
||||
</Style>
|
||||
</Styles>
|
||||
</controls:NavigationView.Styles>
|
||||
|
||||
<controls:Frame Name="TabFrame" IsNavigationStackEnabled="False" CacheSize="0" Padding="20">
|
||||
<controls:Frame.NavigationPageFactory>
|
||||
<ui:PageFactory/>
|
||||
</controls:Frame.NavigationPageFactory>
|
||||
</controls:Frame>
|
||||
</controls:NavigationView>
|
||||
</UserControl>
|
||||
@@ -3,8 +3,7 @@ using System.Reactive.Disposables;
|
||||
using Artemis.UI.Shared;
|
||||
using Avalonia.ReactiveUI;
|
||||
using Avalonia.Threading;
|
||||
using FluentAvalonia.UI.Media.Animation;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings;
|
||||
@@ -19,6 +18,11 @@ public partial class SettingsView : ReactiveUserControl<SettingsViewModel>
|
||||
|
||||
private void Navigate(ViewModelBase viewModel)
|
||||
{
|
||||
Dispatcher.UIThread.Invoke(() => TabFrame.NavigateFromObject(viewModel, new FrameNavigationOptions {TransitionInfoOverride = new SlideNavigationTransitionInfo()}));
|
||||
Dispatcher.UIThread.Invoke(() => TabFrame.NavigateFromObject(viewModel));
|
||||
}
|
||||
|
||||
private void NavigationView_OnBackRequested(object? sender, NavigationViewBackRequestedEventArgs e)
|
||||
{
|
||||
ViewModel?.GoBack();
|
||||
}
|
||||
}
|
||||
@@ -55,4 +55,9 @@ public class SettingsViewModel : RoutableHostScreen<RoutableScreen>, IMainScreen
|
||||
if (SelectedTab == null)
|
||||
await _router.Navigate(SettingTabs.First().Path);
|
||||
}
|
||||
|
||||
public void GoBack()
|
||||
{
|
||||
_router.Navigate("workshop");
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,19 @@
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" VerticalAlignment="Top">
|
||||
<ItemsRepeater ItemsSource="{CompiledBinding Plugins}" MaxWidth="1000" VerticalAlignment="Center">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<ItemsControl ItemsSource="{CompiledBinding Plugins}" MaxWidth="1000" VerticalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="plugins:PluginSettingsViewModel">
|
||||
<ContentControl Content="{CompiledBinding}" Height="200"/>
|
||||
<ContentControl Content="{CompiledBinding}" Height="200" />
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user