DocScannerEditor.xaml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mobile:MobilePage xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  5. xmlns:views="http://xamarin.com/schemas/2020/toolkit"
  6. xmlns:local="clr-namespace:PRS.Mobile;assembly=PRS.Mobile"
  7. xmlns:xforms="clr-namespace:Syncfusion.SfImageEditor.XForms;assembly=Syncfusion.SfImageEditor.XForms"
  8. x:Class="PRS.Mobile.Modules.DocScanner.DocScannerEditor">
  9. <mobile:MobilePage.BindingContext>
  10. <local:DocScannerEditViewModel x:Name="ViewModel" />
  11. </mobile:MobilePage.BindingContext>
  12. <mobile:MobilePage.Resources>
  13. <mobile:StringToBooleanConverter x:Key="ShowIfEmpty" HasValue="False"/>
  14. </mobile:MobilePage.Resources>
  15. <mobile:MobilePage.PrimaryMenu>
  16. <mobile:MobileMenuButton x:Name="_save" Image="save" Clicked="SaveBtn_Clicked" />
  17. </mobile:MobilePage.PrimaryMenu>
  18. <mobile:MobilePage.PageContent>
  19. <Grid Margin="5">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="*"/>
  22. <RowDefinition Height="150" />
  23. </Grid.RowDefinitions>
  24. <mobile:MobileCard
  25. Grid.Row="0" Padding="0">
  26. <xforms:SfImageEditor
  27. x:Name="_imageEditor"
  28. HorizontalOptions="Fill"
  29. VerticalOptions="Fill"
  30. ImageSaving="ImageEditor_ImageSaving"
  31. EnableZooming="True">
  32. <xforms:SfImageEditor.ToolbarSettings>
  33. <xforms:ToolbarSettings VisibleShapesItems = "Rectangle,Circle,Line,Arrow" />
  34. </xforms:SfImageEditor.ToolbarSettings>
  35. </xforms:SfImageEditor>
  36. </mobile:MobileCard>
  37. <mobile:MobileCard
  38. Grid.Row="1"
  39. BackgroundColor="LightYellow">
  40. <Grid>
  41. <Label
  42. Text="Enter Note Here"
  43. VerticalOptions="Center"
  44. HorizontalOptions="Center"
  45. FontSize="{StaticResource Theme.Text.Small.Size}" TextColor="Gray"
  46. IsVisible="{Binding Document.Note, Converter={StaticResource ShowIfEmpty}}" />
  47. <mobile:MobileEditor
  48. BackgroundColor="Transparent"
  49. Text="{Binding Document.Note, Mode=TwoWay}"/>
  50. </Grid>
  51. </mobile:MobileCard>
  52. </Grid>
  53. </mobile:MobilePage.PageContent>
  54. </mobile:MobilePage>