forked from amkovkov/GranuSightSoftware2
feat: SectionPanel
Add scroll flugs Add carusel scroll Add animation
This commit is contained in:
@@ -17,6 +17,8 @@ public partial class MainViewModel : ViewModelBase
|
||||
[ObservableProperty] private IRelayCommand _buttonUpClick;
|
||||
[ObservableProperty] private IRelayCommand _buttonDownClick;
|
||||
[ObservableProperty] private int _currentIndex;
|
||||
[ObservableProperty] private bool _canScrollForward;
|
||||
[ObservableProperty] private bool _canScrollBackward;
|
||||
|
||||
public MainViewModel(ILogger<MainViewModel> logger, CameraViewModel cameraViewModel, ResourcesViewModel resourcesViewModel, CameraService cameraService)
|
||||
{
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
x:DataType="local_vm:MainViewModel"
|
||||
x:Class="GSS2.Test.Views.MainView">
|
||||
<Grid ColumnDefinitions="*,100" RowDefinitions="*,*">
|
||||
<Button Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Command="{Binding ButtonUpClick}"/>
|
||||
<Button Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Command="{Binding ButtonDownClick}"/>
|
||||
<core:SectionPanel Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" CurrentIndex="{Binding CurrentIndex}">
|
||||
<Button Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsEnabled="{Binding CanScrollBackward}" Command="{Binding ButtonUpClick}"/>
|
||||
<Button Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsEnabled="{Binding CanScrollForward}" Command="{Binding ButtonDownClick}"/>
|
||||
<core:SectionPanel Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" ClipToBounds="True" CanScrollForward="{Binding CanScrollForward}" CanScrollBackward="{Binding CanScrollBackward}" CurrentIndex="{Binding CurrentIndex}">
|
||||
<ContentControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding ResourcesViewModel}" />
|
||||
<ContentControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{Binding CameraViewModel}" />
|
||||
<Grid ColumnDefinitions="100, *">
|
||||
|
||||
Reference in New Issue
Block a user