|
7 | 7 | xmlns:flowlauncher="clr-namespace:Flow.Launcher"
|
8 | 8 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
9 | 9 | xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
| 10 | + xmlns:sys="clr-namespace:System;assembly=mscorlib" |
10 | 11 | xmlns:ui="http://schemas.modernwpf.com/2019"
|
11 | 12 | xmlns:vm="clr-namespace:Flow.Launcher.ViewModel"
|
12 | 13 | Name="FlowMainWindow"
|
|
490 | 491 | x:Name="PreviewSubTitle"
|
491 | 492 | Style="{DynamicResource PreviewItemSubTitleStyle}"
|
492 | 493 | Text="{Binding Result.SubTitle}" />
|
493 |
| - <StackPanel Orientation="Horizontal"> |
494 |
| - <TextBlock Text="FileSize" /> |
495 |
| - <TextBlock Style="{DynamicResource PreviewItemSubTitleStyle}" Text="{Binding Result.FileSize}" /> |
496 |
| - </StackPanel> |
497 |
| - <StackPanel Orientation="Horizontal"> |
498 |
| - <TextBlock Text="Created" /> |
499 |
| - <TextBlock Style="{DynamicResource PreviewItemSubTitleStyle}" Text="{Binding Result.FileCreated}" /> |
500 |
| - </StackPanel> |
501 |
| - <StackPanel Orientation="Horizontal"> |
502 |
| - <TextBlock Text="Last Modified" /> |
503 |
| - <TextBlock Style="{DynamicResource PreviewItemSubTitleStyle}" Text="{Binding Result.LastModifed}" /> |
| 494 | + <StackPanel Orientation="Vertical"> |
| 495 | + <StackPanel.Style> |
| 496 | + <Style TargetType="{x:Type StackPanel}"> |
| 497 | + <Style.Triggers> |
| 498 | + <DataTrigger Binding="{Binding ElementName=SizeValue, UpdateSourceTrigger=PropertyChanged, Path=Text}" Value="{x:Static sys:String.Empty}"> |
| 499 | + <Setter Property="Height" Value="0" /> |
| 500 | + </DataTrigger> |
| 501 | + </Style.Triggers> |
| 502 | + </Style> |
| 503 | + </StackPanel.Style> |
| 504 | + <Separator Margin="0,0,0,0" Style="{DynamicResource PreviewSep}" /> |
| 505 | + <Grid Margin="0,10,0,0" VerticalAlignment="Center"> |
| 506 | + <Grid.ColumnDefinitions> |
| 507 | + <ColumnDefinition Width="100" /> |
| 508 | + <ColumnDefinition Width="*" /> |
| 509 | + </Grid.ColumnDefinitions> |
| 510 | + <Grid.RowDefinitions> |
| 511 | + <RowDefinition Height="Auto" /> |
| 512 | + <RowDefinition Height="Auto" /> |
| 513 | + <RowDefinition Height="Auto" /> |
| 514 | + </Grid.RowDefinitions> |
| 515 | + <TextBlock |
| 516 | + Grid.Row="0" |
| 517 | + Grid.Column="0" |
| 518 | + Margin="0" |
| 519 | + VerticalAlignment="Top" |
| 520 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 521 | + Text="{DynamicResource FileSize}" |
| 522 | + TextWrapping="Wrap" /> |
| 523 | + <TextBlock |
| 524 | + Name="SizeValue" |
| 525 | + Grid.Row="0" |
| 526 | + Grid.Column="1" |
| 527 | + Margin="0" |
| 528 | + HorizontalAlignment="Right" |
| 529 | + VerticalAlignment="Top" |
| 530 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 531 | + Text="{Binding Result.FileSize}" |
| 532 | + TextWrapping="Wrap" /> |
| 533 | + <TextBlock |
| 534 | + Grid.Row="1" |
| 535 | + Grid.Column="0" |
| 536 | + Margin="0" |
| 537 | + VerticalAlignment="Top" |
| 538 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 539 | + Text="{DynamicResource Created}" |
| 540 | + TextWrapping="Wrap" /> |
| 541 | + <TextBlock |
| 542 | + Grid.Row="1" |
| 543 | + Grid.Column="1" |
| 544 | + Margin="0" |
| 545 | + HorizontalAlignment="Right" |
| 546 | + VerticalAlignment="Top" |
| 547 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 548 | + Text="{Binding Result.FileCreated}" |
| 549 | + TextWrapping="Wrap" /> |
| 550 | + |
| 551 | + <TextBlock |
| 552 | + Grid.Row="2" |
| 553 | + Grid.Column="0" |
| 554 | + Margin="0" |
| 555 | + VerticalAlignment="Top" |
| 556 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 557 | + Text="{DynamicResource LastModified}" |
| 558 | + TextWrapping="Wrap" /> |
| 559 | + <TextBlock |
| 560 | + Grid.Row="2" |
| 561 | + Grid.Column="1" |
| 562 | + Margin="0" |
| 563 | + HorizontalAlignment="Right" |
| 564 | + VerticalAlignment="Top" |
| 565 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 566 | + Text="{Binding Result.LastModifed}" |
| 567 | + TextWrapping="Wrap" /> |
| 568 | + </Grid> |
504 | 569 | </StackPanel>
|
505 | 570 | </StackPanel>
|
506 | 571 | </Grid>
|
|
0 commit comments