Commit 215e24c7 authored by Francesco Carraro's avatar Francesco Carraro
Browse files

Refactor MainPage.xaml layout and improve control bindings

- Commented out the outer `ScrollViewer` wrapping the entire content.
- Moved `ContentArea` `Grid` directly within the `Page`.
- Added `ScrollViewer` elements within each `PivotItem` for better scrolling.
- Updated `ProgressRingUserControl` and `OperationResultDialog` for proper loading and display.
- Bound `ActionQuestionUserControl` width and height to `ContentArea` and added action/visibility bindings.
- Ensured proper loading and visibility of `LogBookUserControl`.
- Moved and updated `InAppNotification` for file save success messages.
- Improved overall structure and layout of `MainPage.xaml`.
parent f48899cb
Loading
Loading
Loading
Loading
+144 −140
Original line number Original line Diff line number Diff line
@@ -50,11 +50,11 @@
        </DataTemplate>
        </DataTemplate>
    </Page.Resources>
    </Page.Resources>


    <ScrollViewer VerticalScrollMode="Auto"
    <!--<ScrollViewer VerticalScrollMode="Auto"
                  VerticalScrollBarVisibility="Auto"
                  VerticalScrollBarVisibility="Auto"
                  Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
                  Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">-->
    <Grid x:Name="ContentArea"
    <Grid x:Name="ContentArea"
              Background="{ThemeResource SystemControlPageBackgroundChromeLowBrush}"
          Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
          toolkitui:FrameworkElementExtensions.EnableActualSizeBinding="True"
          toolkitui:FrameworkElementExtensions.EnableActualSizeBinding="True"
          Margin="8">
          Margin="8">
        <Pivot>
        <Pivot>
@@ -62,6 +62,7 @@
            <PivotItem x:Name="pivotItemLabFiles"
            <PivotItem x:Name="pivotItemLabFiles"
                       x:Uid="MainPivotItemLabFiles"
                       x:Uid="MainPivotItemLabFiles"
                       Header="Lab files">
                       Header="Lab files">
                <ScrollViewer>
                    <Grid>
                    <Grid>
                        <Grid.RowDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
@@ -116,11 +117,13 @@
                                                                 CommandSelectStorageItem="{x:Bind ViewModel.CommandSelectRefWhiteFile}" />
                                                                 CommandSelectStorageItem="{x:Bind ViewModel.CommandSelectRefWhiteFile}" />
                        </Grid>
                        </Grid>
                    </Grid>
                    </Grid>
                </ScrollViewer>
            </PivotItem>
            </PivotItem>
            <!-- PIVOT-ITEM XML FILES -->
            <!-- PIVOT-ITEM XML FILES -->
            <PivotItem x:Name="pivotItemXmlFiles"
            <PivotItem x:Name="pivotItemXmlFiles"
                           x:Uid="MainPivotItemXmlFiles"
                           x:Uid="MainPivotItemXmlFiles"
                           Header="Xml files">
                           Header="Xml files">
                <ScrollViewer>
                    <Grid>
                    <Grid>
                        <Grid.RowDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
@@ -159,6 +162,7 @@
                                                                       ProcessedSpectraContainer="{x:Bind ViewModel.ProcessedSpectraContainer, Mode=OneWay}"
                                                                       ProcessedSpectraContainer="{x:Bind ViewModel.ProcessedSpectraContainer, Mode=OneWay}"
                                                                       Grid.Row="2" />
                                                                       Grid.Row="2" />
                    </Grid>
                    </Grid>
                </ScrollViewer>
            </PivotItem>
            </PivotItem>
            <!-- PIVOT-ITEM MULTIPLE FILES SELECTION -->
            <!-- PIVOT-ITEM MULTIPLE FILES SELECTION -->
            <PivotItem x:Name="pivotItemMultipleFilesSelection"
            <PivotItem x:Name="pivotItemMultipleFilesSelection"
@@ -376,5 +380,5 @@
            </controls:InAppNotification.ContentTemplate>
            </controls:InAppNotification.ContentTemplate>
        </controls:InAppNotification>
        </controls:InAppNotification>
    </Grid>
    </Grid>
    </ScrollViewer>
    <!--</ScrollViewer>-->
</Page>
</Page>