RightCardControl.xaml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <UserControl x:Class="GeekDesk.Control.UserControls.PannelCard.RightCardControl"
  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:temp="clr-namespace:GeekDesk.ViewModel.Temp"
  7. xmlns:hc="https://handyorg.github.io/handycontrol"
  8. xmlns:cvt="clr-namespace:GeekDesk.Converts"
  9. xmlns:cst="clr-namespace:GeekDesk.Constant"
  10. xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
  11. xmlns:component="clr-namespace:GeekDesk.CustomComponent.VirtualizingWrapPanel"
  12. xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
  13. xmlns:ot="clr-namespace:GeekDesk.Control.Other"
  14. xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
  15. mc:Ignorable="d"
  16. d:DesignHeight="450" d:DesignWidth="800"
  17. >
  18. <UserControl.Resources>
  19. <!--右侧栏样式动画-->
  20. <!--<Style x:Key="PanelStyle" TargetType="hc:SimpleStackPanel">
  21. <Style.Triggers>
  22. <Trigger Property="IsMouseOver" Value="true">
  23. <Setter Property="Cursor" Value="Hand"/>
  24. </Trigger>
  25. </Style.Triggers>
  26. </Style>-->
  27. <Style x:Key="ImageStyle" TargetType="Image">
  28. <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
  29. <Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
  30. <Setter Property="Source" Value="{Binding BitmapImage}"/>
  31. </Style>
  32. <Style x:Key="ImageStyleNoWrite" TargetType="Image">
  33. <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
  34. <Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
  35. <Setter Property="Source" Value="{Binding BitmapImage_NoWrite}"/>
  36. </Style>
  37. <Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
  38. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  39. <Setter Property="Template">
  40. <Setter.Value>
  41. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  42. <Border>
  43. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  44. </Border>
  45. </ControlTemplate>
  46. </Setter.Value>
  47. </Setter>
  48. </Style>
  49. <Style x:Key="SearchListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
  50. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  51. <Setter Property="VerticalAlignment" Value="Center"/>
  52. <Setter Property="Template">
  53. <Setter.Value>
  54. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  55. <Border>
  56. <Border.Style>
  57. <Style TargetType="Border">
  58. <Setter Property="VerticalAlignment" Value="Center"/>
  59. </Style>
  60. </Border.Style>
  61. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  62. </Border>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67. <Style x:Key="MyPoptipStyle" TargetType="Border">
  68. <Setter Property="HorizontalAlignment" Value="Center"/>
  69. <Setter Property="VerticalAlignment" Value="Center"/>
  70. <Setter Property="BorderThickness" Value="1"/>
  71. <Setter Property="Background" Value="White"/>
  72. <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
  73. <Setter Property="CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
  74. <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
  75. <!--<Setter Property="Template">
  76. <Setter.Value>
  77. <ControlTemplate TargetType="hc:Poptip">
  78. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
  79. <ContentPresenter Margin="{TemplateBinding Padding}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
  80. </Border>
  81. </ControlTemplate>
  82. </Setter.Value>
  83. </Setter>-->
  84. </Style>
  85. <Storyboard x:Key="Custom1Transition1" x:Shared="False">
  86. <DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
  87. <DoubleAnimation.EasingFunction>
  88. <ElasticEase Oscillations="1"/>
  89. </DoubleAnimation.EasingFunction>
  90. </DoubleAnimation>
  91. </Storyboard>
  92. <Storyboard x:Key="Custom2Transition2" x:Shared="False">
  93. <DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
  94. <DoubleAnimation.EasingFunction>
  95. <ElasticEase Oscillations="1"/>
  96. </DoubleAnimation.EasingFunction>
  97. </DoubleAnimation>
  98. </Storyboard>
  99. <Storyboard x:Key="Custom3Transition3" x:Shared="False">
  100. <DoubleAnimation From=".8" To="1" Duration="0:0:0.4">
  101. <DoubleAnimation.EasingFunction>
  102. <ElasticEase Oscillations="1"/>
  103. </DoubleAnimation.EasingFunction>
  104. </DoubleAnimation>
  105. </Storyboard>
  106. <cvt:OpcityConvert x:Key="OpcityConvert"/>
  107. <cvt:GetWidthByWWConvert x:Key="GetWidthByWWConvert"/>
  108. <temp:SearchIconList x:Key="SearchIconList"/>
  109. </UserControl.Resources>
  110. <!--右侧栏-->
  111. <Grid>
  112. <Popup Name="MyPoptip" FlowDirection="LeftToRight"
  113. PopupAnimation="None" Placement="Mouse"
  114. IsOpen="False"
  115. AllowsTransparency="True"
  116. >
  117. <Grid Background="Transparent">
  118. <Border Style="{StaticResource MyPoptipStyle}">
  119. <TextBlock Name="MyPoptipContent" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Left" Text="Test" FontSize="13"/>
  120. </Border>
  121. </Grid>
  122. </Popup>
  123. <hc:Card AllowDrop="True"
  124. x:Name="WrapCard"
  125. Visibility="Visible"
  126. Drop="Wrap_Drop"
  127. BorderThickness="1"
  128. Effect="{DynamicResource EffectShadow2}"
  129. Margin="5,0,5,5" Grid.ColumnSpan="2"
  130. PreviewMouseRightButtonDown="WrapCard_PreviewMouseRightButtonDown"
  131. hc:Dialog.Token="RightWrapCardDialog"
  132. MouseWheel="IconListBox_MouseWheel"
  133. >
  134. <hc:Card.Background>
  135. <SolidColorBrush Color="AliceBlue" hc:GeometryEffect.GeometryEffect="20" Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
  136. </hc:Card.Background>
  137. <hc:Card.BorderBrush>
  138. <SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
  139. </hc:Card.BorderBrush>
  140. <hc:Card.ContextMenu>
  141. <ContextMenu Width="200">
  142. <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
  143. <MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
  144. <MenuItem x:Name="CardLockCM" Header="锁定主面板" Click="LockAppPanel"/>
  145. </ContextMenu>
  146. </hc:Card.ContextMenu>
  147. <hc:DialogContainer>
  148. <Grid>
  149. <ot:PasswordDialog xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility, Duration=50, Delay=0}"
  150. x:Name="PDDialog"
  151. Visibility="Collapsed"
  152. Panel.ZIndex="99"
  153. IsVisibleChanged="PDDialog_IsVisibleChanged"
  154. Margin="0,-100,0,0"/>
  155. <StackPanel Panel.ZIndex="1" Margin="0,-10,-0,0"/>
  156. <WrapPanel Orientation="Horizontal"
  157. Margin="10"
  158. >
  159. <UniformGrid x:Name="WrapUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}">
  160. <!--<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition3}">-->
  161. <ListBox x:Name="IconListBox"
  162. ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=OneWay}"
  163. BorderThickness="0"
  164. Padding="0,10,0,0"
  165. ScrollViewer.CanContentScroll ="True"
  166. VirtualizingPanel.VirtualizationMode="Recycling"
  167. VirtualizingPanel.IsVirtualizing="True"
  168. VirtualizingPanel.IsContainerVirtualizable="True"
  169. VirtualizingPanel.ScrollUnit="Pixel"
  170. >
  171. <ListBox.Template>
  172. <ControlTemplate TargetType="ListBox">
  173. <hc:ScrollViewer x:Name="WrapScroll"
  174. HorizontalScrollBarVisibility="Hidden"
  175. VerticalScrollBarVisibility="Auto"
  176. IsInertiaEnabled="True"
  177. CanContentScroll="True"
  178. PreviewMouseWheel="IconListBox_MouseWheel"
  179. >
  180. <Border BorderBrush="{TemplateBinding BorderBrush}"
  181. BorderThickness="{TemplateBinding BorderBrush}"
  182. Width="{Binding AppConfig.WindowWidth, Mode=OneWay,
  183. Converter={StaticResource GetWidthByWWConvert},
  184. ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_40}}"
  185. >
  186. <ItemsPresenter/>
  187. </Border>
  188. </hc:ScrollViewer>
  189. </ControlTemplate>
  190. </ListBox.Template>
  191. <ListBox.Background>
  192. <SolidColorBrush Color="#00FFFFFF" />
  193. </ListBox.Background>
  194. <ListBox.ItemsPanel>
  195. <ItemsPanelTemplate>
  196. <!--<DraggAnimatedPanel:DraggAnimatedPanel Background="#00FFFFFF"
  197. ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
  198. ItemsHeight="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
  199. HorizontalAlignment="Center"
  200. SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>-->
  201. <component:VirtualizingWrapPanel VirtualizationMode="Recycling"
  202. IsVirtualizing="True"
  203. IsContainerVirtualizable="True"
  204. VirtualizingPanel.ScrollUnit="Pixel"
  205. Width="{Binding AppConfig.WindowWidth, Mode=OneWay,
  206. Converter={StaticResource GetWidthByWWConvert},
  207. ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_40}}"
  208. />
  209. </ItemsPanelTemplate>
  210. </ListBox.ItemsPanel>
  211. <ListBox.Resources>
  212. <ContextMenu x:Key="IconDialog" Width="200">
  213. <MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
  214. <MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
  215. <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
  216. <MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
  217. <MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
  218. <MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
  219. <MenuItem Header="从列表移除" Click="RemoveIcon" Tag="{Binding}"/>
  220. </ContextMenu>
  221. </ListBox.Resources>
  222. <ListBox.ItemContainerStyle>
  223. <Style TargetType="ListBoxItem" BasedOn="{StaticResource MyListBoxItemStyle}">
  224. <Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
  225. </Style>
  226. </ListBox.ItemContainerStyle>
  227. <ListBox.ItemTemplate>
  228. <DataTemplate>
  229. <hc:SimpleStackPanel Tag="{Binding}"
  230. Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
  231. Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
  232. HorizontalAlignment="Center"
  233. Background="#00FFFFFF"
  234. MouseEnter="MenuIcon_MouseEnter"
  235. MouseLeave="MenuIcon_MouseLeave"
  236. MouseMove="MenuIcon_MouseMove"
  237. MouseLeftButtonDown="Icon_MouseLeftButtonDown"
  238. MouseLeftButtonUp="Icon_MouseLeftButtonUp"
  239. >
  240. <!--<StackPanel Background="#00FFFFFF"
  241. MouseEnter="CursorPanel_MouseEnter"
  242. MouseLeave="CursorPanel_MouseLeave"
  243. Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}">-->
  244. <Image Style="{StaticResource ImageStyle}"
  245. RenderOptions.BitmapScalingMode="HighQuality"/>
  246. <TextBlock MaxWidth="80"
  247. Margin="0,5,0,0"
  248. MaxHeight="40"
  249. FontSize="13"
  250. TextWrapping="Wrap"
  251. TextTrimming="WordEllipsis"
  252. TextAlignment="Center"
  253. VerticalAlignment="Center"
  254. Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
  255. Text="{Binding Name}"/>
  256. <!--</StackPanel>-->
  257. </hc:SimpleStackPanel>
  258. </DataTemplate>
  259. </ListBox.ItemTemplate>
  260. </ListBox>
  261. <!--</hc:TransitioningContentControl>-->
  262. </UniformGrid>
  263. </WrapPanel>
  264. </Grid>
  265. </hc:DialogContainer>
  266. </hc:Card>
  267. <hc:Card x:Name="VerticalCard"
  268. Visibility="Hidden"
  269. BorderThickness="1"
  270. Effect="{DynamicResource EffectShadow2}"
  271. Margin="5,0,5,5" Grid.ColumnSpan="2"
  272. MouseLeftButtonDown="VerticalCard_MouseLeftButtonDown"
  273. >
  274. <hc:Card.Background>
  275. <SolidColorBrush Color="AliceBlue"
  276. hc:GeometryEffect.GeometryEffect="20"
  277. Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
  278. </hc:Card.Background>
  279. <hc:Card.BorderBrush>
  280. <SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
  281. </hc:Card.BorderBrush>
  282. <Grid>
  283. <WrapPanel Orientation="Horizontal"
  284. Margin="10"
  285. >
  286. <UniformGrid x:Name="VerticalUFG"
  287. xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}"
  288. >
  289. <!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
  290. <ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList, Mode=OneWay}"
  291. VirtualizingPanel.VirtualizationMode="Recycling"
  292. VirtualizingPanel.IsVirtualizing="True"
  293. VirtualizingPanel.IsContainerVirtualizable="True"
  294. VirtualizingPanel.ScrollUnit="Pixel"
  295. BorderThickness="0"
  296. Padding="0,10,0,0"
  297. x:Name="SearchListBox"
  298. SelectionChanged="SearchListBox_SelectionChanged"
  299. >
  300. <ListBox.Template>
  301. <ControlTemplate TargetType="ListBox">
  302. <hc:ScrollViewer
  303. HorizontalScrollBarVisibility="Hidden"
  304. VerticalScrollBarVisibility="Auto"
  305. IsInertiaEnabled="True"
  306. CanContentScroll="True"
  307. PreviewMouseWheel="VerticalIconList_PreviewMouseWheel"
  308. ScrollChanged="VerticalCard_ScrollChanged"
  309. >
  310. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderBrush}">
  311. <ItemsPresenter/>
  312. </Border>
  313. </hc:ScrollViewer>
  314. </ControlTemplate>
  315. </ListBox.Template>
  316. <ListBox.Background>
  317. <SolidColorBrush Opacity="0"/>
  318. </ListBox.Background>
  319. <ListBox.Resources>
  320. <ContextMenu x:Key="IconDialog" Width="200">
  321. <MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
  322. <MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
  323. <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
  324. <MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
  325. <MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
  326. <MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
  327. </ContextMenu>
  328. </ListBox.Resources>
  329. <ListBox.ItemContainerStyle>
  330. <Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}">
  331. <Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
  332. </Style>
  333. </ListBox.ItemContainerStyle>
  334. <ListBox.ItemsPanel>
  335. <ItemsPanelTemplate>
  336. <VirtualizingStackPanel
  337. Orientation="Vertical"
  338. Background="#00FFFFFF"
  339. VirtualizationMode="Recycling"
  340. IsVirtualizing="True"
  341. IsContainerVirtualizable="True"
  342. VirtualizingPanel.ScrollUnit="Pixel"
  343. Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
  344. Converter={StaticResource GetWidthByWWConvert},
  345. ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}"
  346. />
  347. </ItemsPanelTemplate>
  348. </ListBox.ItemsPanel>
  349. <ListBox.ItemTemplate>
  350. <DataTemplate>
  351. <Border CornerRadius="8">
  352. <Border.Style>
  353. <Style TargetType="Border">
  354. <Setter Property="VerticalAlignment" Value="Center"/>
  355. <Style.Triggers>
  356. <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem }}}"
  357. Value="True">
  358. <Setter Property="Background">
  359. <Setter.Value>
  360. <SolidColorBrush Color="White" Opacity="0.68"/>
  361. </Setter.Value>
  362. </Setter>
  363. </DataTrigger>
  364. </Style.Triggers>
  365. </Style>
  366. </Border.Style>
  367. <WrapPanel Tag="{Binding}"
  368. Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
  369. Converter={StaticResource GetWidthByWWConvert},
  370. ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_HALF}}"
  371. HorizontalAlignment="Left"
  372. VerticalAlignment="Center"
  373. hc:Poptip.HitMode="None"
  374. hc:Poptip.Placement="BottomLeft"
  375. Background="#00FFFFFF"
  376. MouseEnter="SearchIcon_MouseEnter"
  377. MouseLeave="SearchIcon_MouseLeave"
  378. MouseLeftButtonDown="Icon_MouseLeftButtonDown"
  379. MouseLeftButtonUp="Icon_MouseLeftButtonUp"
  380. MouseMove="SearchIcon_MouseMove"
  381. Margin="25,10,0,10"
  382. >
  383. <Image Style="{StaticResource ImageStyleNoWrite}" RenderOptions.BitmapScalingMode="HighQuality"/>
  384. <StackPanel Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
  385. Converter={StaticResource GetWidthByWWConvert},
  386. ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_HALF_TEXT}}" >
  387. <TextBlock
  388. Margin="10,5,0,0"
  389. MaxHeight="40"
  390. FontSize="13"
  391. TextTrimming="CharacterEllipsis"
  392. TextAlignment="Left"
  393. VerticalAlignment="Center"
  394. Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
  395. Text="{Binding Name}"/>
  396. <TextBlock
  397. Margin="10,10,0,0"
  398. MaxHeight="40"
  399. FontSize="11"
  400. TextTrimming="CharacterEllipsis"
  401. TextAlignment="Left"
  402. VerticalAlignment="Center"
  403. Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
  404. Text="{Binding Path}"/>
  405. </StackPanel>
  406. </WrapPanel>
  407. </Border>
  408. </DataTemplate>
  409. </ListBox.ItemTemplate>
  410. </ListBox>
  411. <!--</hc:TransitioningContentControl>-->
  412. </UniformGrid>
  413. </WrapPanel>
  414. </Grid>
  415. </hc:Card>
  416. </Grid>
  417. </UserControl>