123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.CreateFromScannerDialogs"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert"
- xmlns:local="clr-namespace:PDF_Master.Views.Dialog.HomePageToolsDialogs"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <dataconvert:BoolToVisible x:Key="BoolToVisible"/>
- <dataconvert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
- <Style x:Key="ScannerListViewItemStyle" TargetType="{x:Type ListViewItem}">
- <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
- <Setter Property="Panel.Background" Value="#00FFFFFF" />
- <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
- <Setter Property="Border.BorderThickness" Value="1" />
- <Setter Property="FrameworkElement.FocusVisualStyle">
- <Setter.Value>
- <Style TargetType="{x:Type IFrameworkInputElement}">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Margin="2"
- SnapsToDevicePixels="True"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Setter.Value>
- </Setter>
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <Border
- Name="Bd"
- Padding="{TemplateBinding Control.Padding}"
- Background="{TemplateBinding Panel.Background}"
- BorderBrush="{TemplateBinding Border.BorderBrush}"
- BorderThickness="{TemplateBinding Border.BorderThickness}"
- SnapsToDevicePixels="True">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid
- x:Name="SelectedIcon"
- Margin="12.5,0,0.5,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Visibility="Collapsed">
- <Rectangle
- x:Name="Selectedrect"
- Width="20"
- Height="20"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Fill="#FF477EDE" />
- <Path
- x:Name="MultiSelectCheck"
- Width="15"
- Height="15"
- Margin="0,1,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M15.3493 0.596191L16.0564 1.3033L5.44979 11.9099L0.146484 6.6066L0.853591 5.89949L5.45004 10.496L15.3493 0.596191Z"
- Fill="White" />
- </Grid>
- <ContentPresenter
- Grid.Column="1"
- Margin="0,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
- Content="{TemplateBinding ContentControl.Content}"
- ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
- <Rectangle
- Grid.Column="1"
- Height="1"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom"
- Fill="#C5CBD3" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="UIElement.IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
- <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />-->
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="Selector.IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
- <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />-->
- <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="Selector.IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
- <!--<Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />-->
- <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
- </MultiTrigger>
- <Trigger Property="UIElement.IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <DataTemplate x:Key="ScannerItemTemplate">
- <TextBlock Text="{Binding ScannerName}">
- </TextBlock>
- </DataTemplate>
- </UserControl.Resources>
- <cus:DialogContent Header="Create PDF from scanner">
- <Grid>
- <Grid Height="406" Margin="16,0,16,0"
- Visibility="{Binding IsEmptyScanner,Converter={StaticResource InvertBoolToVisibleConvert}}"
- >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="360"/>
- <ColumnDefinition Width="16"/>
- <ColumnDefinition Width="312"/>
- </Grid.ColumnDefinitions>
- <Border Background="{StaticResource color.sys.layout.mg}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <TextBlock Text="Scanners"/>
- <ListView Grid.Row="1" x:Name="listScanner"
- ItemsSource="{Binding Scanners}"
- ItemContainerStyle="{StaticResource ScannerListViewItemStyle}"
- ItemTemplate="{StaticResource ScannerItemTemplate}"
- >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SelectedScannerCommand}" CommandParameter="{Binding ElementName=listScanner,Path=SelectedItem}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ListView>
- </Grid>
- </Border>
- <Border Grid.Column="2" CornerRadius="6" BorderThickness="1" BorderBrush="{StaticResource color.sys.layout.divider}">
- <Grid>
- <Image x:Name="ScannerImage" Source="{Binding Img}"
- Visibility="{Binding IsEmptyImg,Converter={StaticResource InvertBoolToVisibleConvert}}"
- >
- </Image>
- <TextBlock Text="NO Image" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"
- Visibility="{Binding IsEmptyImg,Converter={StaticResource BoolToVisible}}"
- />
- </Grid>
- </Border>
- </Grid>
- <Grid Height="406" Margin="16,0,16,0" Visibility="{Binding IsEmptyScanner,Converter={StaticResource BoolToVisible}}">
- <TextBlock Text="No Scanners" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Grid>
- </Grid>
-
- <cus:DialogContent.BottmBar>
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <Button
- Width="80"
- Height="32"
- Command="{Binding CreateCommand}"
- Content="Scan"
- Style="{StaticResource Btn.cta}" />
- <Button
- Width="80"
- Height="32"
- Margin="16,0"
- Command="{Binding CancelCommand}"
- Content="Cancel"
- Style="{StaticResource btn.sec}" />
- </StackPanel>
- </cus:DialogContent.BottmBar>
- </cus:DialogContent>
- </UserControl>
|