|
380 | 380 | </ContentControl>
|
381 | 381 |
|
382 | 382 | </Grid>
|
383 |
| - <Grid> |
384 |
| - <Grid.ColumnDefinitions> |
385 |
| - <ColumnDefinition Width="*" MinWidth="80" /> |
386 |
| - <ColumnDefinition Width="Auto" /> |
387 |
| - <ColumnDefinition Width="0.85*" MinWidth="244" /> |
388 |
| - </Grid.ColumnDefinitions> |
389 |
| - <StackPanel |
390 |
| - x:Name="ResultArea" |
391 |
| - Grid.Column="0" |
392 |
| - Grid.ColumnSpan="{Binding ResultAreaColumn}"> |
393 |
| - <Border Style="{DynamicResource WindowRadius}"> |
394 |
| - <Border.Clip> |
395 |
| - <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
396 |
| - <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> |
397 |
| - <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> |
398 |
| - <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> |
399 |
| - </MultiBinding> |
400 |
| - </Border.Clip> |
| 383 | + <Border Style="{DynamicResource WindowRadius}"> |
| 384 | + <Border.Clip> |
| 385 | + <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
| 386 | + <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> |
| 387 | + <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> |
| 388 | + <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> |
| 389 | + </MultiBinding> |
| 390 | + </Border.Clip> |
| 391 | + <Grid> |
| 392 | + <Grid.ColumnDefinitions> |
| 393 | + <ColumnDefinition Width="*" MinWidth="80" /> |
| 394 | + <ColumnDefinition Width="Auto" /> |
| 395 | + <ColumnDefinition Width="0.85*" MinWidth="244" /> |
| 396 | + </Grid.ColumnDefinitions> |
| 397 | + <StackPanel |
| 398 | + x:Name="ResultArea" |
| 399 | + Grid.Column="0" |
| 400 | + Grid.ColumnSpan="{Binding ResultAreaColumn}"> |
401 | 401 | <ContentControl>
|
402 | 402 | <flowlauncher:ResultListBox
|
403 | 403 | x:Name="ResultListBox"
|
404 | 404 | DataContext="{Binding Results}"
|
405 | 405 | LeftClickResultCommand="{Binding LeftClickResultCommand}"
|
406 | 406 | RightClickResultCommand="{Binding RightClickResultCommand}" />
|
407 | 407 | </ContentControl>
|
408 |
| - </Border> |
409 |
| - <Border Style="{DynamicResource WindowRadius}"> |
410 |
| - <Border.Clip> |
411 |
| - <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
412 |
| - <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> |
413 |
| - <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> |
414 |
| - <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> |
415 |
| - </MultiBinding> |
416 |
| - </Border.Clip> |
417 | 408 | <ContentControl>
|
418 | 409 | <flowlauncher:ResultListBox
|
419 | 410 | x:Name="ContextMenu"
|
420 | 411 | DataContext="{Binding ContextMenu}"
|
421 | 412 | LeftClickResultCommand="{Binding LeftClickResultCommand}"
|
422 | 413 | RightClickResultCommand="{Binding RightClickResultCommand}" />
|
423 | 414 | </ContentControl>
|
424 |
| - </Border> |
425 |
| - <Border Style="{DynamicResource WindowRadius}"> |
426 |
| - <Border.Clip> |
427 |
| - <MultiBinding Converter="{StaticResource BorderClipConverter}"> |
428 |
| - <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /> |
429 |
| - <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> |
430 |
| - <Binding Path="CornerRadius" RelativeSource="{RelativeSource Self}" /> |
431 |
| - </MultiBinding> |
432 |
| - </Border.Clip> |
433 | 415 | <ContentControl>
|
434 | 416 | <flowlauncher:ResultListBox
|
435 | 417 | x:Name="History"
|
436 | 418 | DataContext="{Binding History}"
|
437 | 419 | LeftClickResultCommand="{Binding LeftClickResultCommand}"
|
438 | 420 | RightClickResultCommand="{Binding RightClickResultCommand}" />
|
439 | 421 | </ContentControl>
|
440 |
| - </Border> |
441 |
| - </StackPanel> |
442 |
| - <GridSplitter |
443 |
| - Grid.Column="1" |
444 |
| - Margin="0" |
445 |
| - HorizontalAlignment="Center" |
446 |
| - VerticalAlignment="Stretch" |
447 |
| - Background="Transparent" |
448 |
| - ShowsPreview="True" |
449 |
| - Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> |
450 |
| - <GridSplitter.Template> |
451 |
| - <ControlTemplate TargetType="{x:Type GridSplitter}"> |
452 |
| - <Border Style="{DynamicResource PreviewBorderStyle}" /> |
453 |
| - </ControlTemplate> |
454 |
| - </GridSplitter.Template> |
455 |
| - </GridSplitter> |
456 |
| - <Grid |
457 |
| - x:Name="Preview" |
458 |
| - Grid.Column="2" |
459 |
| - VerticalAlignment="Stretch" |
460 |
| - Style="{DynamicResource PreviewArea}" |
461 |
| - Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> |
462 |
| - <Border |
463 |
| - MinHeight="380" |
464 |
| - d:DataContext="{d:DesignInstance vm:ResultViewModel}" |
465 |
| - DataContext="{Binding SelectedItem, ElementName=ResultListBox}" |
466 |
| - Visibility="{Binding ShowDefaultPreview}"> |
467 |
| - <Grid |
468 |
| - Margin="0 0 10 5" |
469 |
| - VerticalAlignment="Stretch" |
470 |
| - Background="Transparent"> |
471 |
| - <Grid.RowDefinitions> |
472 |
| - <RowDefinition Height="*" /> |
473 |
| - <RowDefinition Height="Auto" /> |
474 |
| - </Grid.RowDefinitions> |
475 |
| - <Grid Grid.Row="0" VerticalAlignment="Center"> |
| 422 | + </StackPanel> |
| 423 | + <GridSplitter |
| 424 | + Grid.Column="1" |
| 425 | + Margin="0" |
| 426 | + HorizontalAlignment="Center" |
| 427 | + VerticalAlignment="Stretch" |
| 428 | + Background="Transparent" |
| 429 | + ShowsPreview="True" |
| 430 | + Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> |
| 431 | + <GridSplitter.Template> |
| 432 | + <ControlTemplate TargetType="{x:Type GridSplitter}"> |
| 433 | + <Border Style="{DynamicResource PreviewBorderStyle}" /> |
| 434 | + </ControlTemplate> |
| 435 | + </GridSplitter.Template> |
| 436 | + </GridSplitter> |
| 437 | + <Grid |
| 438 | + x:Name="Preview" |
| 439 | + Grid.Column="2" |
| 440 | + VerticalAlignment="Stretch" |
| 441 | + Style="{DynamicResource PreviewArea}" |
| 442 | + Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> |
| 443 | + <Border |
| 444 | + MinHeight="380" |
| 445 | + d:DataContext="{d:DesignInstance vm:ResultViewModel}" |
| 446 | + DataContext="{Binding SelectedItem, ElementName=ResultListBox}" |
| 447 | + Visibility="{Binding ShowDefaultPreview}"> |
| 448 | + <Grid |
| 449 | + Margin="0 0 10 5" |
| 450 | + VerticalAlignment="Stretch" |
| 451 | + Background="Transparent"> |
476 | 452 | <Grid.RowDefinitions>
|
477 |
| - <RowDefinition Height="Auto" /> |
| 453 | + <RowDefinition Height="*" /> |
478 | 454 | <RowDefinition Height="Auto" />
|
479 | 455 | </Grid.RowDefinitions>
|
480 |
| - <TextBlock |
481 |
| - x:Name="PreviewGlyphIcon" |
482 |
| - Grid.Row="0" |
483 |
| - Height="Auto" |
484 |
| - Margin="0 16 0 0" |
485 |
| - FontFamily="{Binding Glyph.FontFamily}" |
486 |
| - Style="{DynamicResource PreviewGlyph}" |
487 |
| - Text="{Binding Glyph.Glyph}" |
488 |
| - Visibility="{Binding ShowGlyph}" /> |
489 |
| - <Image |
490 |
| - x:Name="PreviewImageIcon" |
491 |
| - Grid.Row="0" |
492 |
| - MaxHeight="320" |
493 |
| - Margin="0 16 0 0" |
494 |
| - HorizontalAlignment="Center" |
495 |
| - Source="{Binding PreviewImage}" |
496 |
| - StretchDirection="DownOnly" |
497 |
| - Visibility="{Binding ShowPreviewImage}"> |
498 |
| - <Image.Style> |
499 |
| - <Style TargetType="{x:Type Image}"> |
500 |
| - <Setter Property="MaxWidth" Value="96" /> |
| 456 | + <Grid Grid.Row="0" VerticalAlignment="Center"> |
| 457 | + <Grid.RowDefinitions> |
| 458 | + <RowDefinition Height="Auto" /> |
| 459 | + <RowDefinition Height="Auto" /> |
| 460 | + </Grid.RowDefinitions> |
| 461 | + <TextBlock |
| 462 | + x:Name="PreviewGlyphIcon" |
| 463 | + Grid.Row="0" |
| 464 | + Height="Auto" |
| 465 | + Margin="0 16 0 0" |
| 466 | + FontFamily="{Binding Glyph.FontFamily}" |
| 467 | + Style="{DynamicResource PreviewGlyph}" |
| 468 | + Text="{Binding Glyph.Glyph}" |
| 469 | + Visibility="{Binding ShowGlyph}" /> |
| 470 | + <Image |
| 471 | + x:Name="PreviewImageIcon" |
| 472 | + Grid.Row="0" |
| 473 | + MaxHeight="320" |
| 474 | + Margin="0 16 0 0" |
| 475 | + HorizontalAlignment="Center" |
| 476 | + Source="{Binding PreviewImage}" |
| 477 | + StretchDirection="DownOnly" |
| 478 | + Visibility="{Binding ShowPreviewImage}"> |
| 479 | + <Image.Style> |
| 480 | + <Style TargetType="{x:Type Image}"> |
| 481 | + <Setter Property="MaxWidth" Value="96" /> |
| 482 | + <Style.Triggers> |
| 483 | + <DataTrigger Binding="{Binding UseBigThumbnail}" Value="True"> |
| 484 | + <Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" /> |
| 485 | + </DataTrigger> |
| 486 | + </Style.Triggers> |
| 487 | + </Style> |
| 488 | + </Image.Style> |
| 489 | + </Image> |
| 490 | + <TextBlock |
| 491 | + x:Name="PreviewTitle" |
| 492 | + Grid.Row="1" |
| 493 | + Margin="0 6 0 16" |
| 494 | + HorizontalAlignment="Stretch" |
| 495 | + Style="{DynamicResource PreviewItemTitleStyle}" |
| 496 | + Text="{Binding Result.Title}" |
| 497 | + TextAlignment="Center" |
| 498 | + TextWrapping="Wrap" /> |
| 499 | + </Grid> |
| 500 | + <StackPanel Grid.Row="1"> |
| 501 | + <StackPanel.Style> |
| 502 | + <Style TargetType="{x:Type StackPanel}"> |
501 | 503 | <Style.Triggers>
|
502 |
| - <DataTrigger Binding="{Binding UseBigThumbnail}" Value="True"> |
503 |
| - <Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" /> |
| 504 | + <DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0"> |
| 505 | + <Setter Property="Visibility" Value="Collapsed" /> |
504 | 506 | </DataTrigger>
|
505 | 507 | </Style.Triggers>
|
506 | 508 | </Style>
|
507 |
| - </Image.Style> |
508 |
| - </Image> |
509 |
| - <TextBlock |
510 |
| - x:Name="PreviewTitle" |
511 |
| - Grid.Row="1" |
512 |
| - Margin="0 6 0 16" |
513 |
| - HorizontalAlignment="Stretch" |
514 |
| - Style="{DynamicResource PreviewItemTitleStyle}" |
515 |
| - Text="{Binding Result.Title}" |
516 |
| - TextAlignment="Center" |
517 |
| - TextWrapping="Wrap" /> |
| 509 | + </StackPanel.Style> |
| 510 | + <Separator Style="{DynamicResource PreviewSep}" /> |
| 511 | + <TextBlock |
| 512 | + x:Name="PreviewSubTitle" |
| 513 | + Style="{DynamicResource PreviewItemSubTitleStyle}" |
| 514 | + Text="{Binding Result.SubTitle}" /> |
| 515 | + </StackPanel> |
518 | 516 | </Grid>
|
519 |
| - <StackPanel Grid.Row="1"> |
520 |
| - <StackPanel.Style> |
521 |
| - <Style TargetType="{x:Type StackPanel}"> |
522 |
| - <Style.Triggers> |
523 |
| - <DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0"> |
524 |
| - <Setter Property="Visibility" Value="Collapsed" /> |
525 |
| - </DataTrigger> |
526 |
| - </Style.Triggers> |
527 |
| - </Style> |
528 |
| - </StackPanel.Style> |
529 |
| - <Separator Style="{DynamicResource PreviewSep}" /> |
530 |
| - <TextBlock |
531 |
| - x:Name="PreviewSubTitle" |
532 |
| - Style="{DynamicResource PreviewItemSubTitleStyle}" |
533 |
| - Text="{Binding Result.SubTitle}" /> |
534 |
| - </StackPanel> |
535 |
| - </Grid> |
536 |
| - </Border> |
537 |
| - <Border |
538 |
| - MinHeight="380" |
539 |
| - MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}" |
540 |
| - Padding="0 0 10 10" |
541 |
| - d:DataContext="{d:DesignInstance vm:ResultViewModel}" |
542 |
| - DataContext="{Binding SelectedItem, ElementName=ResultListBox}" |
543 |
| - Visibility="{Binding ShowCustomizedPreview}"> |
544 |
| - <ContentControl Content="{Binding Result.PreviewPanel.Value}" /> |
545 |
| - </Border> |
| 517 | + </Border> |
| 518 | + <Border |
| 519 | + MinHeight="380" |
| 520 | + MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}" |
| 521 | + Padding="0 0 10 10" |
| 522 | + d:DataContext="{d:DesignInstance vm:ResultViewModel}" |
| 523 | + DataContext="{Binding SelectedItem, ElementName=ResultListBox}" |
| 524 | + Visibility="{Binding ShowCustomizedPreview}"> |
| 525 | + <ContentControl Content="{Binding Result.PreviewPanel.Value}" /> |
| 526 | + </Border> |
| 527 | + </Grid> |
546 | 528 | </Grid>
|
547 |
| - </Grid> |
| 529 | + </Border> |
548 | 530 | </StackPanel>
|
549 | 531 | </Border>
|
550 | 532 | </Window>
|
0 commit comments