terminal/src/cascadia/TerminalApp/App.base.h
Oscar Calvo ab08320dde Apply a GDI region to the top level Island window to allow dragging with a single Island (#929)
* Use a region to cut off the dragable region
* Use proper measurements for the draggable area
* Working better, paint works most of the time
* Fix a bug where paint is incomplete when double clicking the dragbar
* Remove old fork on XamlApplication
* Upgrade to XamlApp preview6.2
* Add Microsoft.VCRTForwarders to make it easy to dogfood

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>
Co-Authored-By: Mike Griese <migrie@microsoft.com>
2019-06-25 13:06:11 -07:00

41 lines
1.2 KiB
C++

#pragma once
namespace winrt::TerminalApp::implementation
{
template<typename D, typename... I>
struct App_baseWithProvider : public App_base<D, ::winrt::Windows::UI::Xaml::Markup::IXamlMetadataProvider>
{
using IXamlType = ::winrt::Windows::UI::Xaml::Markup::IXamlType;
IXamlType GetXamlType(::winrt::Windows::UI::Xaml::Interop::TypeName const& type)
{
return AppProvider()->GetXamlType(type);
}
IXamlType GetXamlType(::winrt::hstring const& fullName)
{
return AppProvider()->GetXamlType(fullName);
}
::winrt::com_array<::winrt::Windows::UI::Xaml::Markup::XmlnsDefinition> GetXmlnsDefinitions()
{
return AppProvider()->GetXmlnsDefinitions();
}
private:
bool _contentLoaded{ false };
std::shared_ptr<XamlMetaDataProvider> _appProvider;
std::shared_ptr<XamlMetaDataProvider> AppProvider()
{
if (!_appProvider)
{
_appProvider = std::make_shared<XamlMetaDataProvider>();
}
return _appProvider;
}
};
template<typename D, typename... I>
using AppT2 = App_baseWithProvider<D, I...>;
}