|
476 | 476 | </Style> |
477 | 477 |
|
478 | 478 | <Style TargetType="{x:Type local:AcrylicMessageBox}" BasedOn="{StaticResource {x:Type local:AcrylicWindow}}"> |
479 | | - <Setter Property="Background" Value=" #80FFFFFF" /> |
| 479 | + <Setter Property="Background" Value="{DynamicResource SystemAltMediumColorBrush}" /> |
480 | 480 | <Setter Property="MinWidth" Value="154" /> |
481 | 481 | <Setter Property="MinHeight" Value="140" /> |
482 | 482 | <Setter Property="ResizeMode" Value="NoResize" /> |
483 | 483 | <Setter Property="ShowInTaskbar" Value="False" /> |
484 | 484 | <Setter Property="SizeToContent" Value="WidthAndHeight" /> |
485 | 485 | <Setter Property="local:AcrylicWindow.AcrylicWindowStyle" Value="NoIcon" /> |
486 | | - |
| 486 | + <Setter Property="fw:ExtendViewIntoTitleBar" Value="True" /> |
487 | 487 | <Setter Property="Content"> |
488 | 488 | <Setter.Value> |
489 | | - <Grid> |
| 489 | + <Grid local:PointerTracker.Enabled="True" |
| 490 | + Background="Transparent"> |
490 | 491 | <Grid.RowDefinitions> |
491 | 492 | <RowDefinition /> |
492 | | - <RowDefinition Height="48" /> |
| 493 | + <RowDefinition Height="42" /> |
493 | 494 | </Grid.RowDefinitions> |
494 | 495 | <!-- メッセージ本文 --> |
495 | | - <TextBlock Margin="12,26,39,27" |
| 496 | + <local:DropShadowPanel Grid.Row="0" |
| 497 | + ShadowMode="Outer" |
| 498 | + ShadowOpacity="0.3" |
| 499 | + Margin="0,-30,0,0" |
| 500 | + BlurRadius="6" |
| 501 | + Background="{DynamicResource SystemAltLowColorBrush}" |
| 502 | + local:PointerTracker.Enabled="True"> |
| 503 | + <Grid Margin="0,30,0,0"> |
| 504 | + <Grid Height="30" |
| 505 | + VerticalAlignment="Top"> |
| 506 | + <TextBlock x:Name="captionText" |
| 507 | + Margin="8,0,0,0" |
| 508 | + Text="{Binding Title, RelativeSource={RelativeSource AncestorType=Window}}" |
| 509 | + VerticalAlignment="Center" |
| 510 | + TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"/> |
| 511 | + </Grid> |
| 512 | + <TextBlock Margin="12,56,39,27" |
496 | 513 | HorizontalAlignment="Left" |
497 | 514 | VerticalAlignment="Top" |
498 | 515 | Text="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=Message}" |
499 | 516 | TextOptions.TextFormattingMode="Display"> |
500 | | - <TextBlock.Style> |
501 | | - <Style TargetType="{x:Type TextBlock}"> |
502 | | - <!-- メッセージが空の時は、TextBlockを非表示にする --> |
503 | | - <Style.Triggers> |
504 | | - <Trigger Property="Text" Value="{x:Null}"> |
505 | | - <Setter Property="Visibility" Value="Collapsed" /> |
506 | | - </Trigger> |
507 | | - <Trigger Property="Text" Value=""> |
508 | | - <Setter Property="Visibility" Value="Collapsed" /> |
509 | | - </Trigger> |
510 | | - </Style.Triggers> |
511 | | - </Style> |
512 | | - </TextBlock.Style> |
513 | | - </TextBlock> |
514 | | - |
515 | | - <!-- メッセージボックス下部のボタン領域 --> |
516 | | - <local:DropShadowPanel Grid.Row="1" |
517 | | - ShadowMode="Outer" |
518 | | - ShadowOpacity="0.3" |
519 | | - BlurRadius="10" |
520 | | - Background="#20F0F0F0" |
521 | | - local:PointerTracker.Enabled="True"> |
522 | | - <Grid x:Name="PART_ButtonsArea" Margin="38,0,5,0" HorizontalAlignment="Right"> |
523 | | - <Grid.ColumnDefinitions> |
524 | | - <ColumnDefinition Width="Auto" /> |
525 | | - <ColumnDefinition Width="Auto" /> |
526 | | - <ColumnDefinition Width="Auto" /> |
527 | | - <ColumnDefinition Width="Auto" /> |
528 | | - </Grid.ColumnDefinitions> |
529 | | - <Grid.Resources> |
530 | | - <Style TargetType="{x:Type Button}" BasedOn="{StaticResource MessageBoxButtonBaseStyle}" /> |
531 | | - </Grid.Resources> |
532 | | - <Button x:Name="PART_OkButton" |
533 | | - Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=OkButtonContent}" |
534 | | - Visibility="Collapsed" /> |
535 | | - <Button x:Name="PART_YesButton" |
536 | | - Grid.Column="1" |
537 | | - Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=YesButtonContent}" |
538 | | - Visibility="Collapsed" /> |
539 | | - <Button x:Name="PART_NoButton" |
540 | | - Grid.Column="2" |
541 | | - Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=NoButtonContent}" |
542 | | - Visibility="Collapsed" /> |
543 | | - <Button x:Name="PART_CancelButton" |
544 | | - Grid.Column="3" |
545 | | - Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=CancelButtonContent}" |
546 | | - Visibility="Collapsed" /> |
| 517 | + <TextBlock.Style> |
| 518 | + <Style TargetType="{x:Type TextBlock}"> |
| 519 | + <!-- メッセージが空の時は、TextBlockを非表示にする --> |
| 520 | + <Style.Triggers> |
| 521 | + <Trigger Property="Text" Value="{x:Null}"> |
| 522 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 523 | + </Trigger> |
| 524 | + <Trigger Property="Text" Value=""> |
| 525 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 526 | + </Trigger> |
| 527 | + </Style.Triggers> |
| 528 | + </Style> |
| 529 | + </TextBlock.Style> |
| 530 | + </TextBlock> |
547 | 531 | </Grid> |
548 | 532 | </local:DropShadowPanel> |
| 533 | + |
| 534 | + <!-- メッセージボックス下部のボタン領域 --> |
| 535 | + <Grid x:Name="PART_ButtonsArea" |
| 536 | + Grid.Row="1" |
| 537 | + Margin="38,0,5,0" HorizontalAlignment="Right"> |
| 538 | + <Grid.ColumnDefinitions> |
| 539 | + <ColumnDefinition Width="Auto" /> |
| 540 | + <ColumnDefinition Width="Auto" /> |
| 541 | + <ColumnDefinition Width="Auto" /> |
| 542 | + <ColumnDefinition Width="Auto" /> |
| 543 | + </Grid.ColumnDefinitions> |
| 544 | + <Grid.Resources> |
| 545 | + <Style TargetType="{x:Type Button}" BasedOn="{StaticResource MessageBoxButtonBaseStyle}" /> |
| 546 | + </Grid.Resources> |
| 547 | + <Button x:Name="PART_OkButton" |
| 548 | + Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=OkButtonContent}" |
| 549 | + Visibility="Collapsed" /> |
| 550 | + <Button x:Name="PART_YesButton" |
| 551 | + Grid.Column="1" |
| 552 | + Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=YesButtonContent}" |
| 553 | + Visibility="Collapsed" /> |
| 554 | + <Button x:Name="PART_NoButton" |
| 555 | + Grid.Column="2" |
| 556 | + Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=NoButtonContent}" |
| 557 | + Visibility="Collapsed" /> |
| 558 | + <Button x:Name="PART_CancelButton" |
| 559 | + Grid.Column="3" |
| 560 | + Content="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=CancelButtonContent}" |
| 561 | + Visibility="Collapsed" /> |
| 562 | + </Grid> |
549 | 563 | </Grid> |
550 | 564 | </Setter.Value> |
551 | 565 | </Setter> |
|
0 commit comments