|
367 | 367 | </GridSplitter.Template>
|
368 | 368 | </GridSplitter>
|
369 | 369 |
|
370 |
| - <Grid |
| 370 | + <ContentPresenter |
371 | 371 | x:Name="Preview"
|
372 | 372 | Grid.Column="2"
|
373 | 373 | VerticalAlignment="Stretch"
|
| 374 | + MinHeight="{Binding PreviewMinHeight}" |
| 375 | + MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}" |
| 376 | + Margin="0 0 10 5" |
374 | 377 | Style="{DynamicResource PreviewArea}"
|
375 |
| - Visibility="{Binding InternalPreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}"> |
376 |
| - <Border |
377 |
| - MinHeight="380" |
378 |
| - Visibility="{Binding ShowDefaultPreview}"> |
379 |
| - <Grid |
380 |
| - d:DataContext="{d:DesignInstance vm:ResultViewModel}" |
381 |
| - DataContext="{Binding PreviewSelectedItem, Mode=OneWay}" |
382 |
| - Margin="0 0 10 5" |
383 |
| - VerticalAlignment="Stretch" |
384 |
| - Background="Transparent"> |
385 |
| - <Grid.RowDefinitions> |
386 |
| - <RowDefinition Height="*" /> |
387 |
| - <RowDefinition Height="Auto" /> |
388 |
| - </Grid.RowDefinitions> |
389 |
| - <Grid Grid.Row="0" VerticalAlignment="Center"> |
390 |
| - <Grid.RowDefinitions> |
391 |
| - <RowDefinition Height="Auto" /> |
392 |
| - <RowDefinition Height="Auto" /> |
393 |
| - </Grid.RowDefinitions> |
394 |
| - <TextBlock |
395 |
| - x:Name="PreviewGlyphIcon" |
396 |
| - Grid.Row="0" |
397 |
| - Height="Auto" |
398 |
| - Margin="0 16 0 0" |
399 |
| - FontFamily="{Binding Glyph.FontFamily}" |
400 |
| - Style="{DynamicResource PreviewGlyph}" |
401 |
| - Text="{Binding Glyph.Glyph}" |
402 |
| - Visibility="{Binding ShowGlyph}" /> |
403 |
| - <Image |
404 |
| - x:Name="PreviewImageIcon" |
405 |
| - Grid.Row="0" |
406 |
| - MaxHeight="320" |
407 |
| - Margin="0 16 0 0" |
408 |
| - HorizontalAlignment="Center" |
409 |
| - Source="{Binding PreviewImage}" |
410 |
| - StretchDirection="DownOnly" |
411 |
| - Visibility="{Binding ShowPreviewImage}"> |
412 |
| - <Image.Style> |
413 |
| - <Style TargetType="{x:Type Image}"> |
414 |
| - <Setter Property="MaxWidth" Value="96" /> |
415 |
| - <Style.Triggers> |
416 |
| - <DataTrigger Binding="{Binding UseBigThumbnail}" Value="True"> |
417 |
| - <Setter Property="MaxWidth" Value="{Binding ElementName=Preview, Path=ActualWidth}" /> |
418 |
| - </DataTrigger> |
419 |
| - </Style.Triggers> |
420 |
| - </Style> |
421 |
| - </Image.Style> |
422 |
| - </Image> |
423 |
| - <TextBlock |
424 |
| - x:Name="PreviewTitle" |
425 |
| - Grid.Row="1" |
426 |
| - Margin="0 6 0 16" |
427 |
| - HorizontalAlignment="Stretch" |
428 |
| - Style="{DynamicResource PreviewItemTitleStyle}" |
429 |
| - Text="{Binding Result.Title}" |
430 |
| - TextAlignment="Center" |
431 |
| - TextWrapping="Wrap" /> |
432 |
| - </Grid> |
433 |
| - <StackPanel Grid.Row="1"> |
434 |
| - <StackPanel.Style> |
435 |
| - <Style TargetType="{x:Type StackPanel}"> |
436 |
| - <Style.Triggers> |
437 |
| - <DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0"> |
438 |
| - <Setter Property="Visibility" Value="Collapsed" /> |
439 |
| - </DataTrigger> |
440 |
| - </Style.Triggers> |
441 |
| - </Style> |
442 |
| - </StackPanel.Style> |
443 |
| - <Separator Style="{DynamicResource PreviewSep}" /> |
444 |
| - <TextBlock |
445 |
| - x:Name="PreviewSubTitle" |
446 |
| - Style="{DynamicResource PreviewItemSubTitleStyle}" |
447 |
| - Text="{Binding Result.SubTitle}" /> |
448 |
| - </StackPanel> |
449 |
| - </Grid> |
450 |
| - </Border> |
451 |
| - <Border |
452 |
| - MinHeight="380" |
453 |
| - MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}" |
454 |
| - Padding="0 0 10 10" |
455 |
| - Visibility="{Binding ShowCustomizedPreview}"> |
456 |
| - <ContentControl Content="{Binding CustomizedPreviewControl}" /> |
457 |
| - </Border> |
458 |
| - </Grid> |
| 378 | + Visibility="{Binding PreviewVisibility}" |
| 379 | + Content="{Binding PreviewContent}"> |
| 380 | + </ContentPresenter> |
459 | 381 | </Grid>
|
460 | 382 | </Border>
|
461 | 383 | </StackPanel>
|
|
0 commit comments