Simplify title bar (#442)

Fixes #407 (partially) and #441

Description of the changes:
Remove TitleBarHelper and all <Border x:Name="CustomTitleBar" />
Let the system defines the draggable region
Centralize all events and functions associated to the title bar in a single control TitleBar instead of code splitted between MainPage/TitleBar/HistoryList/Memory.
Use the standard title bar when high contrast is activated instead of the custom one.
Modify the color of the title when the window doesn't have focus
Fix the right padding of the title bar with high contrast

How changes were validated:
Manually tested with LtR and RtL languages
Manually tested with high contrast
Tested when History and Memory flyout are opened
This commit is contained in:
Rudy Huyn
2019-04-19 18:49:08 -07:00
committed by Daniel Belcher
parent 0d31d5a5a2
commit bd04c92c1c
19 changed files with 168 additions and 394 deletions

View File

@@ -120,19 +120,6 @@ void Memory::IsErrorVisualState::set(bool value)
}
}
void Memory::MemoryList_Loaded(_In_ Object^ sender, _In_ RoutedEventArgs^ e)
{
// When transitioning between docked and undocked view states, the memory list is
// unloaded and then loaded, so we attempt to create the titlebarhelper every time
// we are loaded, letting the util function check if we are docked or not.
m_titleBarHelper = TitleBarHelper::CreateTitleBarHelperIfNotDocked(CustomTitleBar);
}
void Memory::MemoryList_Unloaded(_In_ Object^ sender, _In_ RoutedEventArgs^ e)
{
m_titleBarHelper = nullptr;
}
MemoryItemViewModel^ Memory::GetMemoryItemForCurrentFlyout()
{
auto listViewItem = m_memoryItemFlyout->Target;