UserBusWindow.xaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <Window x:Class="ivf_tl_Manage.Win.UserBusWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:ivf_tl_Manage.Win"
  7. xmlns:customControl="clr-namespace:ivf_tl_CustomControls;assembly=ivf_tl_CustomControls_PC"
  8. xmlns:controls="clr-namespace:ivf_tl_Manage.UserControls"
  9. mc:Ignorable="d"
  10. FontFamily="{StaticResource sourceHan}"
  11. WindowStyle="None"
  12. ShowInTaskbar="False"
  13. WindowStartupLocation="CenterOwner"
  14. Background="Transparent"
  15. AllowsTransparency="True"
  16. Width="710" Height="615">
  17. <Canvas Width="710" Height="615">
  18. <Canvas.Background>
  19. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/RoleSettingWindowBackground.png"/>
  20. </Canvas.Background>
  21. <DockPanel Canvas.Left="60" Canvas.Top="57">
  22. <TextBlock DockPanel.Dock="Top" Margin="2 0 2 2" x:Name="_title_TextBlock" Canvas.Left="60" Canvas.Top="57" Text="{DynamicResource 0216}" FontWeight="Medium" Foreground="Black" FontSize="20"/>
  23. <Rectangle DockPanel.Dock="Bottom" Canvas.Left="58" Canvas.Top="90" Height="3" Fill="#4D75AC" RadiusX="1.5" RadiusY="1.5"/>
  24. </DockPanel>
  25. <!--<TextBlock x:Name="_title_TextBlock" Canvas.Left="60" Canvas.Top="57" Text="{DynamicResource 0216}" FontWeight="Medium" Foreground="Black" FontSize="20"/>
  26. <Rectangle Canvas.Left="58" Canvas.Top="90" Width="122" Height="2" Fill="#4D75AC" RadiusX="1" RadiusY="1"/>-->
  27. <customControl:ButtonImage Canvas.Left="634" Canvas.Top="60" Width="18" Height="18" Click="Cancel_Click"
  28. IconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/CloseGrayIcon.png"
  29. MouseOverIconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/CloseBlueIcon.png"/>
  30. <Border Canvas.Left="60" Canvas.Top="110" Width="590" Height="365" BorderThickness="1" BorderBrush="#C6C6C6" CornerRadius="6">
  31. <Grid>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition />
  34. <ColumnDefinition Width="auto"/>
  35. <ColumnDefinition Width="auto"/>
  36. </Grid.ColumnDefinitions>
  37. <ListBox x:Name="_listBox" Grid.Column="0" Style="{StaticResource ListBoxStyleUserBus}" HorizontalContentAlignment="Stretch" MaxHeight="355" VerticalAlignment="Top"
  38. BorderThickness="0" Background="Transparent" SelectionChanged="_listBox_SelectionChanged" Margin="0 5 0 0">
  39. <ListBox.ItemContainerStyle>
  40. <Style TargetType="{x:Type ListBoxItem}">
  41. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  42. <Setter Property="Template">
  43. <Setter.Value>
  44. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  45. <StackPanel x:Name="_listBoxItem" Background="Transparent" Orientation="Horizontal" HorizontalAlignment="Stretch" Height="30">
  46. <Image VerticalAlignment="Center" Width="20" Height="20" Margin="15 0 10 0" Tag="{Binding}" MouseDown="Image_MouseDown"
  47. Source="{Binding isOpen,Converter={StaticResource CustomButtonMouseOverIconConvert},ConverterParameter=SettingIcon}"/>
  48. <TextBlock VerticalAlignment="Center" Text="{Binding name}" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"/>
  49. </StackPanel>
  50. <ControlTemplate.Triggers>
  51. <Trigger Property="IsSelected" Value="True">
  52. <Setter TargetName="_listBoxItem" Property="Background" Value="#ECEEF2"/>
  53. </Trigger>
  54. </ControlTemplate.Triggers>
  55. </ControlTemplate>
  56. </Setter.Value>
  57. </Setter>
  58. </Style>
  59. </ListBox.ItemContainerStyle>
  60. </ListBox>
  61. <Rectangle Grid.Column="1" Width="1" Height="365" Fill="#C6C6C6"
  62. Visibility="{Binding ElementName=_children,Path=HasItems,Converter={StaticResource BooleanToVisibilityConverter}}"/>
  63. <Border Width="294" Height="363" Grid.Column="2" Background="#ECEEF2" CornerRadius="0 5 5 0"
  64. Visibility="{Binding ElementName=_children,Path=HasItems,Converter={StaticResource BooleanToVisibilityConverter}}">
  65. <ListBox x:Name="_children" DisplayMemberPath="name" Style="{StaticResource ListBoxStyleUserBus}" Width="294" HorizontalContentAlignment="Stretch" MaxHeight="355" VerticalAlignment="Top"
  66. BorderThickness="0" Background="Transparent" Margin="0 5 0 0" FontWeight="Medium" Foreground="#4D4D4D" FontSize="16"
  67. >
  68. </ListBox>
  69. </Border>
  70. </Grid>
  71. </Border>
  72. <TextBlock x:Name="message" Canvas.Left="100" Canvas.Top="508" Text="" MaxWidth="320" FontWeight="Medium" FontSize="16" Foreground="Red" TextWrapping="Wrap"/>
  73. <customControl:ButtonCornerRadius IsTabStop="False" Canvas.Left="554" Canvas.Top="497" Width="104" Height="56" Click="Ok_Click" IsDefault="True" Content="{DynamicResource 0024}" FontSize="14" MarginMask="10">
  74. <customControl:ButtonCornerRadius.Background>
  75. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/OkButtonIcon1.png"/>
  76. </customControl:ButtonCornerRadius.Background>
  77. </customControl:ButtonCornerRadius>
  78. <customControl:ButtonCornerRadius IsTabStop="False" Canvas.Left="446" Canvas.Top="497" Width="104" Height="56" Click="Cancel_Click" IsCancel="True" Content="{DynamicResource 0025}" Foreground="#717171" FontSize="14" MarginMask="10">
  79. <customControl:ButtonCornerRadius.Background>
  80. <ImageBrush ImageSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/CancelButtonIcon1.png"/>
  81. </customControl:ButtonCornerRadius.Background>
  82. </customControl:ButtonCornerRadius>
  83. <!--<customControl:ButtonImage IsTabStop="False" Canvas.Left="446" Canvas.Top="497" Width="104" Height="56" Click="Cancel_Click" IsCancel="True" IconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/CancelButtonIcon.png" MouseOverIconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/CancelButtonMouseOverIcon.png"/>-->
  84. <!--<customControl:ButtonImage IsTabStop="False" Canvas.Left="554" Canvas.Top="497" Width="104" Height="56" Click="Ok_Click" IsDefault="True" IconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/OkButtonIcon.png" MouseOverIconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/OkButtonMouseOverIcon.png"/>-->
  85. </Canvas>
  86. </Window>