Skip to content

Commit

Permalink
Wpf: Vertically center text in tab page headers
Browse files Browse the repository at this point in the history
fixes #2197
  • Loading branch information
cwensley committed May 24, 2023
1 parent 4d3371c commit b773575
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Eto.Wpf/Forms/Controls/TabPageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public TabPageHandler()
var header = new swc.StackPanel { Orientation = swc.Orientation.Horizontal };
headerImage = new swc.Image();
headerText = new swc.TextBlock();
headerText.VerticalAlignment = sw.VerticalAlignment.Center;
header.Children.Add(headerImage);
header.Children.Add(headerText);
Control.Header = header;
Expand Down
2 changes: 1 addition & 1 deletion test/Eto.Test/Sections/Controls/TabControlSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ TabControl DefaultTabs()
control.Pages.Add(new TabPage
{
Text = "Tab 2",
Image = TestIcons.TestIcon.WithSize(16, 16),
Image = TestIcons.TestIcon.WithSize(32, 32),
Content = TabTwo()
});

Expand Down

0 comments on commit b773575

Please sign in to comment.