Skip to content

Commit 1711d5c

Browse files
Feedback addressed
1 parent e87eb10 commit 1711d5c

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

Save/AutoSavePDFinAWS/MainPage.xaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
xmlns:pdfViewer="clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer"
55
x:Class="AutoSavePDFinAWS.MainPage">
66

7-
<!-- Resource definitions for styling UI components -->
7+
<!-- UI resource definitions -->
88
<ContentPage.Resources>
99
<ResourceDictionary>
1010

11-
<!-- Style for toolbar buttons with modern appearance and visual states -->
11+
<!-- Toolbar button style -->
1212
<Style x:Key="ToolbarButtonStyle"
1313
TargetType="Button">
1414
<Setter Property="CornerRadius"
@@ -24,7 +24,7 @@
2424
<Setter Property="FontAttributes"
2525
Value="Bold" />
2626

27-
<!-- Visual state management for enabled/disabled states -->
27+
<!-- Visual states for button -->
2828
<Setter Property="VisualStateManager.VisualStateGroups">
2929
<VisualStateGroupList>
3030
<VisualStateGroup Name="CommonStates">
@@ -47,7 +47,7 @@
4747
</ResourceDictionary>
4848
</ContentPage.Resources>
4949

50-
<!-- Main layout container with two rows: toolbar and PDF viewer -->
50+
<!-- Main layout grid -->
5151
<Grid RowSpacing="0">
5252
<Grid.RowDefinitions>
5353
<RowDefinition Height="Auto" />
@@ -56,7 +56,7 @@
5656
<!-- PDF viewer row - fills remaining space -->
5757
</Grid.RowDefinitions>
5858

59-
<!-- Top toolbar containing file operations and status notifications -->
59+
<!-- Toolbar -->
6060
<Border Grid.Row="0"
6161
BackgroundColor="#F3F4F6"
6262
Padding="12"
@@ -69,18 +69,17 @@
6969
<!-- Button area - auto-sized -->
7070
</Grid.ColumnDefinitions>
7171

72-
<!-- Status notification display showing current operation or file state -->
72+
<!-- Status notification label -->
7373
<Label Grid.Column="0"
7474
x:Name="NotificationLabel"
7575
Text="{Binding NotificationText}"
7676
HorizontalOptions="Start"
7777
VerticalOptions="Center" />
7878

79-
<!-- Horizontal container for toolbar buttons and controls -->
79+
<!-- Toolbar controls -->
8080
<HorizontalStackLayout Grid.Column="1">
8181

82-
<!-- Manual save button - enabled only when auto-save is disabled -->
83-
<!-- Uses InverseBooleanConverter to enable when IsAutoSaveEnabled is false -->
82+
<!-- Save button (manual) -->
8483
<Button x:Name="SaveButton"
8584
FontSize="20"
8685
Text="&#xe75f;"
@@ -91,14 +90,13 @@
9190
Command="{Binding SavePdfCommand}"
9291
IsEnabled="{Binding IsAutoSaveEnabled, Converter={StaticResource InverseBooleanConverter}}"/>
9392

94-
<!-- Auto-save toggle control with checkbox and label -->
93+
<!-- Auto-save toggle -->
9594
<Border StrokeThickness="1"
9695
Padding="0,0,12,0"
9796
Margin="4,0"
9897
Stroke="LightGray"
9998
VerticalOptions="Center">
10099
<StackLayout Orientation="Horizontal" VerticalOptions="Center">
101-
<!-- Checkbox bound to auto-save enabled property -->
102100
<CheckBox IsChecked="{Binding IsAutoSaveEnabled}" VerticalOptions="Center" />
103101
<Label Text="Auto Save" VerticalOptions="Center" />
104102
</StackLayout>
@@ -108,8 +106,7 @@
108106
</Grid>
109107
</Border>
110108

111-
<!-- Syncfusion PDF Viewer control with event handlers for document editing -->
112-
<!-- Events are wired to track all types of PDF modifications for auto-save -->
109+
<!-- PDF Viewer with event handlers -->
113110
<pdfViewer:SfPdfViewer Grid.Row="1"
114111
x:Name="PdfViewer"
115112
DocumentLoaded="PdfViewer_DocumentLoaded"

0 commit comments

Comments
 (0)