|
529 | 529 | </Grid> |
530 | 530 | </DataTemplate> |
531 | 531 |
|
| 532 | + |
| 533 | + <!--ImageLayerHistory--> |
| 534 | + <DataTemplate DataType="{x:Type Common:ImageLayerHistory}"> |
| 535 | + <Grid x:Name="Root" Background="Transparent" > |
| 536 | + <DockPanel Height="134" Width="100" > |
| 537 | + <Grid DockPanel.Dock="Top"> |
| 538 | + <CommonControls:TransparentImageElement |
| 539 | + Height="100" |
| 540 | + Stretch="Uniform" |
| 541 | + DecodePixelHeight="100" |
| 542 | + UriSource="{Binding ThumbPath, Converter={StaticResource StringToUriConverter}}" /> |
| 543 | + |
| 544 | + <UniformGrid Columns="2" Height="24" VerticalAlignment="Bottom" Visibility="{Binding IsMouseOver, ElementName=Root, Converter={StaticResource BooleanToHiddenConverter}}" Background="#8F000000"> |
| 545 | + <Button |
| 546 | + Style="{StaticResource TransparentButton}" |
| 547 | + Command="{Binding PreviewItemCommand, RelativeSource={RelativeSource AncestorType=Controls:HistoryControl}}" |
| 548 | + CommandParameter="{Binding}"> |
| 549 | + <CommonControls:FontAwesome Icon="f08e" IconStyle="Solid" Size="16" Color="{StaticResource InfoColour}" /> |
| 550 | + </Button> |
| 551 | + <Button |
| 552 | + Style="{StaticResource TransparentButton}" |
| 553 | + Command="{Binding RemoveItemCommand, RelativeSource={RelativeSource AncestorType=Controls:HistoryControl}}" |
| 554 | + CommandParameter="{Binding}"> |
| 555 | + <CommonControls:FontAwesome Icon="e2b4" IconStyle="Solid" Size="16" Color="{StaticResource DangerColour}" /> |
| 556 | + </Button> |
| 557 | + </UniformGrid> |
| 558 | + </Grid> |
| 559 | + <StackPanel Margin="0,3,0,0"> |
| 560 | + <TextBlock TextAlignment="Center" LineHeight="14" LineStackingStrategy="BlockLineHeight"> |
| 561 | + <Run Text="{Binding Width}" /> |
| 562 | + <Run Text="x" /> |
| 563 | + <Run Text="{Binding Height}" /> |
| 564 | + <LineBreak/> |
| 565 | + <Run Text="{Binding Source}" /> |
| 566 | + </TextBlock> |
| 567 | + </StackPanel> |
| 568 | + </DockPanel> |
| 569 | + |
| 570 | + |
| 571 | + <!-- Popup card --> |
| 572 | + <Popup x:Name="CardPopup" Style="{StaticResource HistoryPopup}"> |
| 573 | + <Border Background="#01000000"> |
| 574 | + <Border Style="{StaticResource HistoryContainer}" > |
| 575 | + <StackPanel Margin="6,4,6,6"> |
| 576 | + <TextBlock Text="{Binding Source}" /> |
| 577 | + <TextBlock Text="{Binding Width, StringFormat={}Width: {0}}" /> |
| 578 | + <TextBlock Text="{Binding Height, StringFormat={}Height: {0}}" /> |
| 579 | + <TextBlock Text="{Binding MediaPath}" /> |
| 580 | + </StackPanel> |
| 581 | + </Border> |
| 582 | + </Border> |
| 583 | + </Popup> |
| 584 | + |
| 585 | + |
| 586 | + <!-- Hover triggers --> |
| 587 | + <Grid.Triggers> |
| 588 | + <EventTrigger RoutedEvent="MouseEnter"> |
| 589 | + <BeginStoryboard> |
| 590 | + <Storyboard> |
| 591 | + <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CardPopup" Storyboard.TargetProperty="IsOpen"> |
| 592 | + <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/> |
| 593 | + </BooleanAnimationUsingKeyFrames> |
| 594 | + </Storyboard> |
| 595 | + </BeginStoryboard> |
| 596 | + </EventTrigger> |
| 597 | + <EventTrigger RoutedEvent="MouseLeave"> |
| 598 | + <BeginStoryboard> |
| 599 | + <Storyboard> |
| 600 | + <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CardPopup" Storyboard.TargetProperty="IsOpen"> |
| 601 | + <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"/> |
| 602 | + </BooleanAnimationUsingKeyFrames> |
| 603 | + </Storyboard> |
| 604 | + </BeginStoryboard> |
| 605 | + </EventTrigger> |
| 606 | + </Grid.Triggers> |
| 607 | + |
| 608 | + </Grid> |
| 609 | + </DataTemplate> |
| 610 | + |
| 611 | + |
532 | 612 | </CommonControls:BaseControl.Resources> |
533 | 613 |
|
534 | 614 | <Grid DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HistoryControl}}}"> |
|
0 commit comments