|
339 | 339 | </Grid> |
340 | 340 | </DataTemplate> |
341 | 341 |
|
| 342 | + |
| 343 | + |
| 344 | + <!--NarrateItem--> |
| 345 | + <DataTemplate DataType="{x:Type Common:NarrateItem}"> |
| 346 | + <Grid x:Name="Root" Background="Transparent" > |
| 347 | + <DockPanel Height="150" Width="110" > |
| 348 | + <Grid DockPanel.Dock="Top"> |
| 349 | + |
| 350 | + <Grid Width="110" Height="110"> |
| 351 | + <CommonControls:FontAwesome Icon="f001" IconStyle="Solid" Size="70" Color="{StaticResource DefaultForeground}" Opacity=".2" /> |
| 352 | + </Grid> |
| 353 | + |
| 354 | + <Button Width="30" Height="30" |
| 355 | + Style="{StaticResource TransparentButton}" |
| 356 | + HorizontalAlignment="Right" |
| 357 | + VerticalAlignment="Bottom" |
| 358 | + Visibility="{Binding IsMouseOver, ElementName=Root, Converter={StaticResource BooleanToHiddenConverter}}" |
| 359 | + Command="{Binding RemoveItemCommand, RelativeSource={RelativeSource AncestorType=Controls:HistoryControl}}" |
| 360 | + CommandParameter="{Binding}"> |
| 361 | + <CommonControls:FontAwesome Icon="" IconStyle="Solid" Size="20" Color="{StaticResource DangerColour}" /> |
| 362 | + </Button> |
| 363 | + </Grid> |
| 364 | + <StackPanel> |
| 365 | + <TextBlock TextAlignment="Center"> |
| 366 | + <Run Text="{Binding Duration}" /> |
| 367 | + </TextBlock> |
| 368 | + <TextBlock Text="{Binding Source}" TextAlignment="Center" /> |
| 369 | + </StackPanel> |
| 370 | + </DockPanel> |
| 371 | + |
| 372 | + |
| 373 | + <!-- Popup card --> |
| 374 | + <Popup x:Name="CardPopup" |
| 375 | + Height="120" |
| 376 | + Width="242" |
| 377 | + VerticalOffset="16" |
| 378 | + HorizontalOffset="-5" |
| 379 | + Placement="Top" |
| 380 | + StaysOpen="True" |
| 381 | + PopupAnimation="Slide" |
| 382 | + AllowsTransparency="True" > |
| 383 | + <Border Background="#01000000" Margin="0,0,0,0"> |
| 384 | + <Border Margin="0,0,0,18" Background="#80000000" BorderBrush="{StaticResource ContainerBorder}" BorderThickness="1,1,1,0" CornerRadius="6,6,0,0"> |
| 385 | + <StackPanel Margin="6,4,6,6"> |
| 386 | + <TextBlock Text="{Binding Source}" /> |
| 387 | + <TextBlock Text="{Binding Model, StringFormat={}Model: {0}}" /> |
| 388 | + <TextBlock Text="{Binding Voice, StringFormat={}Voice: {0}}" /> |
| 389 | + <TextBlock Text="{Binding Seed, StringFormat={}Seed: {0}}" /> |
| 390 | + <TextBlock Text="{Binding Speed, StringFormat={}Speed: {0}}" /> |
| 391 | + <TextBlock Text="{Binding Steps, StringFormat={}Steps: {0}}" /> |
| 392 | + <TextBlock Text="{Binding Channels, StringFormat={}Channels: {0}}" /> |
| 393 | + <TextBlock Text="{Binding SampleRate, StringFormat={}SampleRate: {0}}" /> |
| 394 | + <TextBlock Text="{Binding Duration, StringFormat={}Duration: {0}}" /> |
| 395 | + <TextBlock Text="{Binding MediaPath}" /> |
| 396 | + </StackPanel> |
| 397 | + </Border> |
| 398 | + </Border> |
| 399 | + </Popup> |
| 400 | + |
| 401 | + <!-- Hover triggers --> |
| 402 | + <Grid.Triggers> |
| 403 | + <EventTrigger RoutedEvent="MouseEnter"> |
| 404 | + <BeginStoryboard> |
| 405 | + <Storyboard> |
| 406 | + <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CardPopup" Storyboard.TargetProperty="IsOpen"> |
| 407 | + <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/> |
| 408 | + </BooleanAnimationUsingKeyFrames> |
| 409 | + </Storyboard> |
| 410 | + </BeginStoryboard> |
| 411 | + </EventTrigger> |
| 412 | + <EventTrigger RoutedEvent="MouseLeave"> |
| 413 | + <BeginStoryboard> |
| 414 | + <Storyboard> |
| 415 | + <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CardPopup" Storyboard.TargetProperty="IsOpen"> |
| 416 | + <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False"/> |
| 417 | + </BooleanAnimationUsingKeyFrames> |
| 418 | + </Storyboard> |
| 419 | + </BeginStoryboard> |
| 420 | + </EventTrigger> |
| 421 | + </Grid.Triggers> |
| 422 | + </Grid> |
| 423 | + </DataTemplate> |
| 424 | + |
342 | 425 | </CommonControls:BaseControl.Resources> |
343 | 426 |
|
344 | 427 | <Grid DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HistoryControl}}}"> |
|
0 commit comments