feat: AmineContentView menu disabling

when scrolling and when SeparatorCalibrationView menu opened
This commit is contained in:
2026-04-14 17:10:02 +03:00
parent 7a42ff5f3c
commit 0c24f05b4f
2 changed files with 11 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@ public partial class AmineContentViewModel : ViewModelBase
[ObservableProperty] public partial SystemViewModel System { get; set; } [ObservableProperty] public partial SystemViewModel System { get; set; }
[ObservableProperty] public partial int CurrentIndex { get; set; } [ObservableProperty] public partial int CurrentIndex { get; set; }
[ObservableProperty] public partial bool IsScrolling { get; set; }
public AmineContentViewModel( public AmineContentViewModel(
NavigationService navigationService, NavigationService navigationService,
+10 -1
View File
@@ -4,6 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:GSS2.ViewModels" xmlns:vm="using:GSS2.ViewModels"
xmlns:core="using:GSS2.UI.Core" xmlns:core="using:GSS2.UI.Core"
xmlns:avalonia_converters="using:Avalonia.Data.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:DataType="vm:AmineContentViewModel"> x:DataType="vm:AmineContentViewModel">
@@ -44,6 +45,14 @@
<!-- Меню --> <!-- Меню -->
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled"> <ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
<ScrollViewer.IsEnabled>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static BoolConverters.Not}" Path="IsScrolling" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="SeparatorCalibration.MenuOpened" />
</MultiBinding>
</ScrollViewer.IsEnabled>
<Grid ColumnSpacing="5"> <Grid ColumnSpacing="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -95,7 +104,7 @@
</ScrollViewer> </ScrollViewer>
<!-- Основной контент --> <!-- Основной контент -->
<core:SectionPanel Grid.Row="1" ClipToBounds="True" CurrentIndex="{Binding CurrentIndex}" Orientation="Horizontal"> <core:SectionPanel Grid.Row="1" ClipToBounds="True" CurrentIndex="{Binding CurrentIndex}" Orientation="Horizontal" IsScrolling="{Binding IsScrolling}">
<ContentControl Content="{Binding Start}"/> <!-- Начальная страница --> <ContentControl Content="{Binding Start}"/> <!-- Начальная страница -->
<ContentControl Content="{Binding Analysis}"/> <!-- Анализ --> <ContentControl Content="{Binding Analysis}"/> <!-- Анализ -->
<ContentControl Content="{Binding Results}"/> <!-- Результаты --> <ContentControl Content="{Binding Results}"/> <!-- Результаты -->