BarcodeForm.xaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ContentPage
  3. xmlns="http://xamarin.com/schemas/2014/forms"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  5. x:Class="comal.timesheets.BarcodeForm"
  6. xmlns:rbBarcode="clr-namespace:Rb.Forms.Barcode.Pcl;assembly=Rb.Forms.Barcode.Pcl"
  7. >
  8. <ContentPage.Content>
  9. <RelativeLayout>
  10. <rbBarcode:BarcodeScanner x:Name="barcodeScanner"
  11. RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
  12. RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
  13. PreviewActivatedCommand="{Binding PreviewActivatedCommand}"
  14. BarcodeChangedCommand="{Binding BarcodeChangedCommand}"
  15. BarcodeDecodedCommand="{Binding BarcodeDecodedCommand}"
  16. PreviewActive="{Binding Preview}"
  17. Torch="{Binding Torch}"
  18. BarcodeDecoder="{Binding Decoder}"
  19. />
  20. <BoxView Color="Transparent"
  21. RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
  22. RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
  23. />
  24. <BoxView x:Name="flash" Color="White" Opacity="0"
  25. RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
  26. RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
  27. />
  28. <BoxView Color="Red" HeightRequest="1" IsVisible="{Binding Initialized}"
  29. RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1}"
  30. RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.5, Constant=-1}"
  31. RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.8}"
  32. />
  33. <Label TextColor="Red" FontSize="17" XAlign="Center"
  34. Text="{Binding Barcode}"
  35. RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
  36. RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.5, Constant=20}"
  37. RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
  38. />
  39. </RelativeLayout>
  40. </ContentPage.Content>
  41. </ContentPage>