|
446 | 446 | Text="Different sizes" />
|
447 | 447 |
|
448 | 448 |
|
449 |
| - <StackPanel> |
450 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_19"> |
451 |
| - <materialDesign:Card> |
452 |
| - <TabControl HorizontalContentAlignment="Left"> |
453 |
| - <TabItem Header="TAB1"> |
454 |
| - <TextBlock Margin="8" Text="Not filled, required width, tab 1" /> |
455 |
| - </TabItem> |
456 |
| - <TabItem Header="TAB 2 Wide"> |
457 |
| - <TextBlock Margin="8" Text="Not filled, required width, tab 2" /> |
458 |
| - </TabItem> |
459 |
| - <TabItem Header="TAB 3 Extremely Wide"> |
460 |
| - <TextBlock Margin="8" Text="Not filled, required width, tab 3" /> |
461 |
| - </TabItem> |
462 |
| - <TabItem Header="TAB 4"> |
463 |
| - <TextBlock Margin="8" Text="Not filled, required width, tab 4" /> |
464 |
| - </TabItem> |
465 |
| - </TabControl> |
466 |
| - </materialDesign:Card> |
467 |
| - </smtx:XamlDisplay> |
468 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_20"> |
469 |
| - <materialDesign:Card> |
470 |
| - <TabControl HorizontalContentAlignment="Left" Style="{StaticResource MaterialDesignUniformTabControl}"> |
471 |
| - <TabItem Header="TAB1"> |
472 |
| - <TextBlock Margin="8" Text="Not filled, uniform width, tab 1" /> |
473 |
| - </TabItem> |
474 |
| - <TabItem Header="TAB 2 Wide"> |
475 |
| - <TextBlock Margin="8" Text="Not filled, uniform width, tab 2" /> |
476 |
| - </TabItem> |
477 |
| - <TabItem Header="TAB 3 Extremely Wide"> |
478 |
| - <TextBlock Margin="8" Text="Not filled, uniform width, tab 3" /> |
479 |
| - </TabItem> |
480 |
| - <TabItem Header="TAB 4"> |
481 |
| - <TextBlock Margin="8" Text="Not filled, uniform width, tab 4" /> |
482 |
| - </TabItem> |
483 |
| - </TabControl> |
484 |
| - </materialDesign:Card> |
485 |
| - </smtx:XamlDisplay> |
486 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_21"> |
487 |
| - <materialDesign:Card> |
488 |
| - <TabControl HorizontalContentAlignment="Center" Style="{StaticResource MaterialDesignFilledTabControl}"> |
489 |
| - <TabItem Header="TAB1"> |
490 |
| - <TextBlock Margin="8" Text="Filled, centered, required width, tab 1" /> |
491 |
| - </TabItem> |
492 |
| - <TabItem Header="TAB 2 Wide"> |
493 |
| - <TextBlock Margin="8" Text="Filled, centered, required width, tab 2" /> |
494 |
| - </TabItem> |
495 |
| - <TabItem Header="TAB 3 Extremely Wide"> |
496 |
| - <TextBlock Margin="8" Text="Filled, centered, required width, tab 3" /> |
497 |
| - </TabItem> |
498 |
| - <TabItem Header="TAB 4"> |
499 |
| - <TextBlock Margin="8" Text="Filled, centered, required width, tab 4" /> |
500 |
| - </TabItem> |
501 |
| - </TabControl> |
502 |
| - </materialDesign:Card> |
503 |
| - </smtx:XamlDisplay> |
504 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_22"> |
505 |
| - <materialDesign:Card> |
506 |
| - <TabControl HorizontalContentAlignment="Center" Style="{StaticResource MaterialDesignFilledUniformTabControl}"> |
507 |
| - <TabItem Header="TAB1"> |
508 |
| - <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 1" /> |
509 |
| - </TabItem> |
510 |
| - <TabItem Header="TAB 2 Wide"> |
511 |
| - <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 2" /> |
512 |
| - </TabItem> |
513 |
| - <TabItem Header="TAB 3 Extremely Wide"> |
514 |
| - <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 3" /> |
515 |
| - </TabItem> |
516 |
| - <TabItem Header="TAB 4"> |
517 |
| - <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 4" /> |
518 |
| - </TabItem> |
519 |
| - </TabControl> |
520 |
| - </materialDesign:Card> |
521 |
| - </smtx:XamlDisplay> |
522 |
| - |
523 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_23"> |
524 |
| - <materialDesign:Card> |
525 |
| - <TabControl HorizontalContentAlignment="Left" materialDesign:ColorZoneAssist.Mode="SecondaryMid"> |
526 |
| - <TabItem Header="TAB1"> |
527 |
| - <TextBlock Margin="8" Text="Not filled secondary example tab 1" /> |
528 |
| - </TabItem> |
529 |
| - <TabItem Header="TAB 2"> |
530 |
| - <TextBlock Margin="8" Text="Not filled secondary example tab 2" /> |
531 |
| - </TabItem> |
532 |
| - <TabItem Header="TAB 3333"> |
533 |
| - <TextBlock Margin="8" Text="Secondary example tab 3333" /> |
534 |
| - </TabItem> |
535 |
| - <TabItem Header="TAB4 Wide"> |
536 |
| - <TextBlock Margin="8" Text="Secondary example tab 4 wide" /> |
537 |
| - </TabItem> |
538 |
| - <TabItem Header="TABbbbbbbbbbbxxxxx 5"> |
539 |
| - <TextBlock Margin="8" Text="Secondary example tab 5" /> |
540 |
| - </TabItem> |
541 |
| - <TabItem Header="TAB 6 Different Width"> |
542 |
| - <TextBlock Margin="8" Text="Secondary example tab 6 different width" /> |
543 |
| - </TabItem> |
544 |
| - <TabItem Header="TAB 7 Looooong"> |
545 |
| - <TextBlock Margin="8" Text="Secondary example tab 7 looooong" /> |
546 |
| - </TabItem> |
547 |
| - <TabItem Header="TAB 8 Width"> |
548 |
| - <TextBlock Margin="8" Text="Secondary example tab 8 width" /> |
549 |
| - </TabItem> |
550 |
| - <TabItem Header="TAAX999"> |
551 |
| - <TextBlock Margin="8" Text="Secondary example tab 9" /> |
552 |
| - </TabItem> |
553 |
| - <TabItem Header="Tab10"> |
554 |
| - <TextBlock Margin="8" Text="Secondary example tab 10" /> |
555 |
| - </TabItem> |
556 |
| - </TabControl> |
557 |
| - </materialDesign:Card> |
558 |
| - </smtx:XamlDisplay> |
559 |
| - |
560 |
| - <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_24"> |
561 |
| - <materialDesign:Card> |
562 |
| - <TabControl HorizontalContentAlignment="Left" |
563 |
| - materialDesign:ColorZoneAssist.Mode="SecondaryMid" |
564 |
| - Style="{StaticResource MaterialDesignFilledTabControl}"> |
565 |
| - <TabItem Header="TAB1"> |
566 |
| - <TextBlock Margin="8" Text="Secondary filled example tab 1" /> |
567 |
| - </TabItem> |
568 |
| - <TabItem Header="TAB 2"> |
569 |
| - <TextBlock Margin="8" Text="Secondary filled example tab 2" /> |
570 |
| - </TabItem> |
571 |
| - </TabControl> |
572 |
| - </materialDesign:Card> |
573 |
| - </smtx:XamlDisplay> |
574 |
| - </StackPanel> |
| 449 | + <StackPanel> |
| 450 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_19"> |
| 451 | + <materialDesign:Card> |
| 452 | + <TabControl HorizontalContentAlignment="Left"> |
| 453 | + <TabItem Header="TAB1"> |
| 454 | + <TextBlock Margin="8" Text="Not filled, required width, tab 1" /> |
| 455 | + </TabItem> |
| 456 | + <TabItem Header="TAB 2 Wide"> |
| 457 | + <TextBlock Margin="8" Text="Not filled, required width, tab 2" /> |
| 458 | + </TabItem> |
| 459 | + <TabItem Header="TAB 3 Extremely Wide"> |
| 460 | + <TextBlock Margin="8" Text="Not filled, required width, tab 3" /> |
| 461 | + </TabItem> |
| 462 | + <TabItem Header="TAB 4"> |
| 463 | + <TextBlock Margin="8" Text="Not filled, required width, tab 4" /> |
| 464 | + </TabItem> |
| 465 | + </TabControl> |
| 466 | + </materialDesign:Card> |
| 467 | + </smtx:XamlDisplay> |
| 468 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_20"> |
| 469 | + <materialDesign:Card> |
| 470 | + <TabControl HorizontalContentAlignment="Left" Style="{StaticResource MaterialDesignUniformTabControl}"> |
| 471 | + <TabItem Header="TAB1"> |
| 472 | + <TextBlock Margin="8" Text="Not filled, uniform width, tab 1" /> |
| 473 | + </TabItem> |
| 474 | + <TabItem Header="TAB 2 Wide"> |
| 475 | + <TextBlock Margin="8" Text="Not filled, uniform width, tab 2" /> |
| 476 | + </TabItem> |
| 477 | + <TabItem Header="TAB 3 Extremely Wide"> |
| 478 | + <TextBlock Margin="8" Text="Not filled, uniform width, tab 3" /> |
| 479 | + </TabItem> |
| 480 | + <TabItem Header="TAB 4"> |
| 481 | + <TextBlock Margin="8" Text="Not filled, uniform width, tab 4" /> |
| 482 | + </TabItem> |
| 483 | + </TabControl> |
| 484 | + </materialDesign:Card> |
| 485 | + </smtx:XamlDisplay> |
| 486 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_21"> |
| 487 | + <materialDesign:Card> |
| 488 | + <TabControl HorizontalContentAlignment="Center" Style="{StaticResource MaterialDesignFilledTabControl}"> |
| 489 | + <TabItem Header="TAB1"> |
| 490 | + <TextBlock Margin="8" Text="Filled, centered, required width, tab 1" /> |
| 491 | + </TabItem> |
| 492 | + <TabItem Header="TAB 2 Wide"> |
| 493 | + <TextBlock Margin="8" Text="Filled, centered, required width, tab 2" /> |
| 494 | + </TabItem> |
| 495 | + <TabItem Header="TAB 3 Extremely Wide"> |
| 496 | + <TextBlock Margin="8" Text="Filled, centered, required width, tab 3" /> |
| 497 | + </TabItem> |
| 498 | + <TabItem Header="TAB 4"> |
| 499 | + <TextBlock Margin="8" Text="Filled, centered, required width, tab 4" /> |
| 500 | + </TabItem> |
| 501 | + </TabControl> |
| 502 | + </materialDesign:Card> |
| 503 | + </smtx:XamlDisplay> |
| 504 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_22"> |
| 505 | + <materialDesign:Card> |
| 506 | + <TabControl HorizontalContentAlignment="Center" Style="{StaticResource MaterialDesignFilledUniformTabControl}"> |
| 507 | + <TabItem Header="TAB1"> |
| 508 | + <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 1" /> |
| 509 | + </TabItem> |
| 510 | + <TabItem Header="TAB 2 Wide"> |
| 511 | + <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 2" /> |
| 512 | + </TabItem> |
| 513 | + <TabItem Header="TAB 3 Extremely Wide"> |
| 514 | + <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 3" /> |
| 515 | + </TabItem> |
| 516 | + <TabItem Header="TAB 4"> |
| 517 | + <TextBlock Margin="8" Text="Filled, centered, uniform width, tab 4" /> |
| 518 | + </TabItem> |
| 519 | + </TabControl> |
| 520 | + </materialDesign:Card> |
| 521 | + </smtx:XamlDisplay> |
| 522 | + |
| 523 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_23"> |
| 524 | + <materialDesign:Card> |
| 525 | + <TabControl HorizontalContentAlignment="Left" materialDesign:ColorZoneAssist.Mode="SecondaryMid"> |
| 526 | + <TabItem Header="TAB1"> |
| 527 | + <TextBlock Margin="8" Text="Not filled secondary example tab 1" /> |
| 528 | + </TabItem> |
| 529 | + <TabItem Header="TAB 2"> |
| 530 | + <TextBlock Margin="8" Text="Not filled secondary example tab 2" /> |
| 531 | + </TabItem> |
| 532 | + <TabItem Header="TAB 3333"> |
| 533 | + <TextBlock Margin="8" Text="Secondary example tab 3333" /> |
| 534 | + </TabItem> |
| 535 | + <TabItem Header="TAB4 Wide"> |
| 536 | + <TextBlock Margin="8" Text="Secondary example tab 4 wide" /> |
| 537 | + </TabItem> |
| 538 | + <TabItem Header="TABbbbbbbbbbbxxxxx 5"> |
| 539 | + <TextBlock Margin="8" Text="Secondary example tab 5" /> |
| 540 | + </TabItem> |
| 541 | + <TabItem Header="TAB 6 Different Width"> |
| 542 | + <TextBlock Margin="8" Text="Secondary example tab 6 different width" /> |
| 543 | + </TabItem> |
| 544 | + <TabItem Header="TAB 7 Looooong"> |
| 545 | + <TextBlock Margin="8" Text="Secondary example tab 7 looooong" /> |
| 546 | + </TabItem> |
| 547 | + <TabItem Header="TAB 8 Width"> |
| 548 | + <TextBlock Margin="8" Text="Secondary example tab 8 width" /> |
| 549 | + </TabItem> |
| 550 | + <TabItem Header="TAAX999"> |
| 551 | + <TextBlock Margin="8" Text="Secondary example tab 9" /> |
| 552 | + </TabItem> |
| 553 | + <TabItem Header="Tab10"> |
| 554 | + <TextBlock Margin="8" Text="Secondary example tab 10" /> |
| 555 | + </TabItem> |
| 556 | + </TabControl> |
| 557 | + </materialDesign:Card> |
| 558 | + </smtx:XamlDisplay> |
| 559 | + |
| 560 | + <smtx:XamlDisplay Margin="0,0,0,16" UniqueKey="tabs_24"> |
| 561 | + <materialDesign:Card> |
| 562 | + <TabControl |
| 563 | + HorizontalContentAlignment="Left" |
| 564 | + materialDesign:ColorZoneAssist.Mode="SecondaryMid" |
| 565 | + Style="{StaticResource MaterialDesignFilledTabControl}"> |
| 566 | + <TabItem Header="TAB1"> |
| 567 | + <TextBlock Margin="8" Text="Secondary filled example tab 1" /> |
| 568 | + </TabItem> |
| 569 | + <TabItem Header="TAB 2"> |
| 570 | + <TextBlock Margin="8" Text="Secondary filled example tab 2" /> |
| 571 | + </TabItem> |
| 572 | + </TabControl> |
| 573 | + </materialDesign:Card> |
| 574 | + </smtx:XamlDisplay> |
| 575 | + </StackPanel> |
575 | 576 |
|
576 | 577 | <TextBlock Margin="0,15,0,20"
|
577 | 578 | Style="{StaticResource MaterialDesignHeadline5TextBlock}"
|
|
587 | 588 | See: https://blog.jetbrains.com/dotnet/2014/09/04/fighting-common-wpf-memory-leaks-with-dotmemory/
|
588 | 589 | -->
|
589 | 590 | <TabControl.ItemTemplate>
|
590 |
| - <DataTemplate DataType="domain:CustomTab"> |
591 |
| - <TextBlock Text="{Binding CustomHeader, Mode=OneTime}" /> |
| 591 | + <DataTemplate> |
| 592 | + <StackPanel Orientation="Horizontal"> |
| 593 | + <TextBlock Text="{Binding CustomHeader}"/> |
| 594 | + <Button Command="{Binding CloseCommand}"> |
| 595 | + <Button.Template> |
| 596 | + <ControlTemplate> |
| 597 | + <materialDesign:PackIcon Kind="Close" Foreground="Red" Background="Transparent"/> |
| 598 | + </ControlTemplate> |
| 599 | + </Button.Template> |
| 600 | + </Button> |
| 601 | + </StackPanel> |
592 | 602 | </DataTemplate>
|
593 | 603 | </TabControl.ItemTemplate>
|
594 | 604 | <TabControl.ContentTemplate>
|
|
0 commit comments