PicUserControl.xaml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <UserControl x:Class="ivf_tl_Manage.UserControls.PicUserControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ivf_tl_Manage.UserControls"
  7. mc:Ignorable="d"
  8. xmlns:customControl="clr-namespace:ivf_tl_CustomControls;assembly=ivf_tl_CustomControls_PC"
  9. FontFamily="{StaticResource sourceHan}"
  10. x:Name="_PicUserControl"
  11. >
  12. <Border x:Name="templateRoot" SnapsToDevicePixels="True" Width="270" Height="302" Background="#DDDDDD" CornerRadius="14">
  13. <Canvas Background="Transparent" Width="270" Height="302" SnapsToDevicePixels="True" Focusable="False">
  14. <Image Canvas.Left="15" Canvas.Top="15" Width="240" Height="240" SnapsToDevicePixels="True" Focusable="False"
  15. Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicLoadIcon.png"/>
  16. <TextBlock Width="270" TextAlignment="Center" Canvas.Top="165" FontWeight="Medium" Foreground="#9B9B9B" FontSize="18" Text="{DynamicResource 0497}"/>
  17. <Image Source="{Binding ElementName=_PicUserControl,Path=ImageSourceUrl}" Canvas.Left="15" Canvas.Top="15" Width="240" Height="240" SnapsToDevicePixels="True" Focusable="False">
  18. <Image.Clip>
  19. <RectangleGeometry Rect="0,0,240,240" RadiusX="14" RadiusY="14"/>
  20. </Image.Clip>
  21. </Image>
  22. <Border Width="270" Canvas.Top="255" Height="47" Background="Transparent" SnapsToDevicePixels="True" Focusable="False">
  23. <TextBlock FontWeight="Medium" Foreground="#4D4D4D" FontSize="18" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True" Focusable="False"
  24. Text="{Binding ElementName=_PicUserControl,Path=ImageInfoString}"/>
  25. </Border>
  26. <Rectangle RadiusX="14" RadiusY="14" Width="270" Height="302" Fill="Black" Opacity="0.4"
  27. Visibility="{Binding ElementName=_check,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
  28. <TextBlock Canvas.Left="25" Canvas.Top="22" FontWeight="Medium" Foreground="White" FontSize="18" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True" Focusable="False"
  29. Text="{Binding ElementName=_PicUserControl,Path=SelectedNum}"
  30. Visibility="{Binding ElementName=_check,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
  31. <customControl:CheckBoxContent x:Name="_check" IsChecked="{Binding ElementName=_PicUserControl,Path=IsSelected}" Canvas.Left="221" Canvas.Top="25" Width="24" Height="24"
  32. CheckImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/PicSelectedIcon.png">
  33. <customControl:CheckBoxContent.Content>
  34. <Ellipse Width="24" Height="24" StrokeThickness="2" Stroke="#BFBFBF" Fill="Transparent" SnapsToDevicePixels="True" Focusable="False"/>
  35. </customControl:CheckBoxContent.Content>
  36. </customControl:CheckBoxContent>
  37. </Canvas>
  38. </Border>
  39. </UserControl>