CreateFromScannerDialogs.xaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.CreateFromScannerDialogs"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:prism="http://prismlibrary.com/"
  8. Width="468"
  9. Height="520"
  10. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  11. prism:ViewModelLocator.AutoWireViewModel="True"
  12. Background="White"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <Style x:Key="radioButtonStyle" TargetType="{x:Type ListBox}">
  16. <Setter Property="ItemContainerStyle">
  17. <Setter.Value>
  18. <Style TargetType="{x:Type ListBoxItem}">
  19. <Setter Property="Margin" Value="9,8,0,0" />
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="ListBoxItem">
  23. <RadioButton Focusable="False" IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
  24. <ContentPresenter />
  25. </RadioButton>
  26. </ControlTemplate>
  27. </Setter.Value>
  28. </Setter>
  29. </Style>
  30. </Setter.Value>
  31. </Setter>
  32. </Style>
  33. </UserControl.Resources>
  34. <Grid Margin="16,0,16,0" Background="White">
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="48" />
  37. <RowDefinition />
  38. <RowDefinition Height="64" />
  39. </Grid.RowDefinitions>
  40. <TextBlock
  41. Height="24"
  42. HorizontalAlignment="Left"
  43. VerticalAlignment="Center"
  44. FontFamily="Segoe UI"
  45. FontSize="16"
  46. FontStyle="Normal"
  47. FontWeight="SemiBold"
  48. Text="Create PDF from scanner" />
  49. <Grid Grid.Row="1" Background="#F7F8FA">
  50. <StackPanel>
  51. <TextBlock
  52. Margin="8,8,0,0"
  53. VerticalAlignment="Center"
  54. FontFamily="Segoe UI"
  55. FontSize="14"
  56. Foreground="#616469"
  57. LineHeight="20"
  58. Text="Scanners" />
  59. <ListBox
  60. Name="Listboxscan"
  61. Height="Auto"
  62. Margin="0,10,0,0"
  63. Background="#F7F8FA"
  64. ItemsSource="{Binding Scanitems}"
  65. BorderThickness="0"
  66. SelectedIndex="{Binding SeIndex, Mode=TwoWay}"
  67. Style="{StaticResource radioButtonStyle}" />
  68. </StackPanel>
  69. </Grid>
  70. <Grid Grid.Row="1" Visibility="{Binding Gridvis,Mode=TwoWay}" Background="#FFFFFF">
  71. <Image
  72. Width="128"
  73. Height="128"
  74. HorizontalAlignment="Center"
  75. VerticalAlignment="Center"
  76. Source="pack://application:,,,/PDF Master;component/Resources/HomeIcon/noScanner.png"
  77. Visibility="Visible"
  78. />
  79. </Grid>
  80. <Grid Grid.Row="2">
  81. <WrapPanel HorizontalAlignment="Right" VerticalAlignment="Center">
  82. <Button
  83. x:Name="But_Scan"
  84. Width="80"
  85. Height="32"
  86. HorizontalAlignment="Center"
  87. VerticalAlignment="Top"
  88. Command="{Binding ToScanCommand}"
  89. Content="Scan"
  90. IsDefault="True"
  91. IsEnabled="{Binding IsEnable,Mode=TwoWay}"
  92. Style="{StaticResource Btn.cta}" />
  93. <Button
  94. Width="80"
  95. Height="32"
  96. Margin="16,0,0,0"
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Top"
  99. Content="Cancel"
  100. IsCancel="True"
  101. Style="{StaticResource btn.sec}" />
  102. </WrapPanel>
  103. </Grid>
  104. </Grid>
  105. </UserControl>