Skip to content

Commit

Permalink
update nits
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Aug 22, 2023
1 parent 4a8db25 commit 7cbf4d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dev/TabView/TabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1097,11 +1097,11 @@ void TabView::UpdateTabWidths(bool shouldUpdateWidths, bool fillAllAvailableSpac
{
const winrt::Size rightContentSize = rightContentPresenter.DesiredSize();

if (const auto item = TabStripFooter().try_as<winrt::FrameworkElement>())
if (const auto tabStripFooter = TabStripFooter().try_as<winrt::FrameworkElement>())
{
const auto minWidth = item.MinWidth();
const auto width = item.Width();
const auto footerWidth = [this,width,minWidth,rightContentSize]() {
const auto minWidth = tabStripFooter.MinWidth();
const auto width = tabStripFooter.Width();
const auto footerWidth = [this, width, minWidth, rightContentSize]() {
if (minWidth < width)
{
return rightContentSize.Width < width ? width : rightContentSize.Width;
Expand Down
7 changes: 3 additions & 4 deletions dev/TabView/TestUI/TabViewPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@

<StackPanel x:Name="FirstTabContent" AutomationProperties.Name="FirstTabContent" Background="{ThemeResource TabViewItemHeaderBackgroundSelected}">
<Button x:Name="FirstTabButton" AutomationProperties.Name="FirstTabButton" Margin="8" FontSize="20">Home Button</Button>
<Button x:Name="NewWindowTabViewPage" Click="NewWindowTabViewPage_Click">
Open new window TabView page.
</Button>
<StackPanel Orientation="Horizontal">
<Button x:Name="TabViewSizingPageButton" AutomationProperties.Name="TabViewSizingPageButton"
Margin="4" Click="TabViewSizingPageButton_Click"
Expand All @@ -183,6 +180,8 @@
<Button x:Name="TabViewTabItemsSourcePageButton" AutomationProperties.Name="TabViewTabItemsSourcePageButton"
Margin="4" Click="TabViewTabItemsSourcePageButton_Click"
FontSize="20">TabView TabItemsSource Page</Button>
<Button x:Name="NewWindowTabViewPage" Click="NewWindowTabViewPage_Click">
Open AppWindowing Page</Button>
</StackPanel>
</StackPanel>
</controls:TabViewItem>
Expand Down Expand Up @@ -278,7 +277,7 @@
TabStripDragOver="OnTabStripDragOver"
TabStripDrop="OnTabStripDrop">
<controls:TabView.TabStripFooter>
<Grid x:Name="MinWidthFooter"></Grid>
<Grid x:Name="MinWidthFooter" />
</controls:TabView.TabStripFooter>

<controls:TabView.TabItems>
Expand Down

0 comments on commit 7cbf4d6

Please sign in to comment.