This PR makes the Header of TabViewItem a custom user control. ## Validation Steps Performed Manual testing Closes #8201
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
#include "winrt/Microsoft.UI.Xaml.Controls.h"
|
|
#include "inc/cppwinrt_utils.h"
|
|
|
|
#include "TabHeaderControl.g.h"
|
|
|
|
namespace winrt::TerminalApp::implementation
|
|
{
|
|
struct TabHeaderControl : TabHeaderControlT<TabHeaderControl>
|
|
{
|
|
TabHeaderControl();
|
|
void BeginRename();
|
|
|
|
void RenameBoxLostFocusHandler(winrt::Windows::Foundation::IInspectable const& sender,
|
|
winrt::Windows::UI::Xaml::RoutedEventArgs const& e);
|
|
|
|
WINRT_CALLBACK(TitleChangeRequested, TerminalApp::TitleChangeRequestedArgs);
|
|
|
|
WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
|
|
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, Title, _PropertyChangedHandlers);
|
|
OBSERVABLE_GETSET_PROPERTY(bool, IsPaneZoomed, _PropertyChangedHandlers);
|
|
|
|
private:
|
|
bool _receivedKeyDown{ false };
|
|
|
|
void _CloseRenameBox();
|
|
};
|
|
}
|
|
|
|
namespace winrt::TerminalApp::factory_implementation
|
|
{
|
|
BASIC_FACTORY(TabHeaderControl);
|
|
}
|