// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1

#pragma once
#ifndef WINRT_Microsoft_UI_Xaml_Controls_H
#define WINRT_Microsoft_UI_Xaml_Controls_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.250303.1"
#include "winrt/Microsoft.UI.Xaml.h"
#include "winrt/impl/Microsoft.UI.2.h"
#include "winrt/impl/Microsoft.UI.Composition.2.h"
#include "winrt/impl/Microsoft.UI.Input.2.h"
#include "winrt/impl/Microsoft.UI.Text.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Controls.Primitives.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Data.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Documents.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Input.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Interop.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Media.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Media.Animation.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Navigation.2.h"
#include "winrt/impl/Microsoft.Web.WebView2.Core.2.h"
#include "winrt/impl/Windows.ApplicationModel.Contacts.2.h"
#include "winrt/impl/Windows.ApplicationModel.DataTransfer.2.h"
#include "winrt/impl/Windows.Devices.Geolocation.2.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Foundation.Numerics.2.h"
#include "winrt/impl/Windows.Globalization.2.h"
#include "winrt/impl/Windows.Globalization.NumberFormatting.2.h"
#include "winrt/impl/Windows.Media.Casting.2.h"
#include "winrt/impl/Windows.Media.Playback.2.h"
#include "winrt/impl/Windows.UI.2.h"
#include "winrt/impl/Windows.UI.Text.2.h"
#include "winrt/impl/Windows.UI.Xaml.Interop.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Controls.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnchorRequestedEventArgs<D>::Anchor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Anchor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Anchor(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnchorRequestedEventArgs<D>::Anchor(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Anchor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Anchor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnchorRequestedEventArgs<D>::AnchorCandidates() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnchorCandidates(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AnchorCandidates(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::UIElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::Source(winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2 const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::FallbackIconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackIconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->get_FallbackIconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::FallbackIconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FallbackIconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->put_FallbackIconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::MirroredWhenRightToLeft() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIcon<D>::MirroredWhenRightToLeft(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>**)this;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AnimatedIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::Source(winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2 const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::FallbackIconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackIconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->get_FallbackIconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::FallbackIconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FallbackIconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->put_FallbackIconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::MirroredWhenRightToLeft() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSource<D>::MirroredWhenRightToLeft(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>**)this;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AnimatedIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSourceStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSourceStatics<D>::FallbackIconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackIconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_FallbackIconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconSourceStatics<D>::MirroredWhenRightToLeftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::StateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_StateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::SetState(winrt::Microsoft::UI::Xaml::DependencyObject const& object, param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetState(*(void**)(&object), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->SetState(*(void**)(&object), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::GetState(winrt::Microsoft::UI::Xaml::DependencyObject const& object) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetState(*(void**)(&object), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->GetState(*(void**)(&object), &result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::FallbackIconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackIconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_FallbackIconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedIconStatics<D>::MirroredWhenRightToLeftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisual<D>::RootVisual() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RootVisual(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)this;
            check_hresult(_winrt_abi_type->get_RootVisual(&value));
        }
        return winrt::Microsoft::UI::Composition::Visual{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisual<D>::Size() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Size(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)this;
            check_hresult(_winrt_abi_type->get_Size(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisual<D>::Duration() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Duration(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>**)this;
            check_hresult(_winrt_abi_type->get_Duration(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisual2<D>::CreateAnimations() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateAnimations());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>**)this;
            check_hresult(_winrt_abi_type->CreateAnimations());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisual2<D>::DestroyAnimations() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DestroyAnimations());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>**)this;
            check_hresult(_winrt_abi_type->DestroyAnimations());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Diagnostics() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Diagnostics(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_Diagnostics(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Duration() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Duration(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_Duration(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Source(winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::FallbackContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_FallbackContent(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::FallbackContent(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FallbackContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->put_FallbackContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::AutoPlay() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoPlay(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_AutoPlay(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::AutoPlay(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AutoPlay(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->put_AutoPlay(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::IsAnimatedVisualLoaded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAnimatedVisualLoaded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_IsAnimatedVisualLoaded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::IsPlaying() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlaying(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_IsPlaying(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::PlaybackRate() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaybackRate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_PlaybackRate(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::PlaybackRate(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaybackRate(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->put_PlaybackRate(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::ProgressObject() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProgressObject(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_ProgressObject(&value));
        }
        return winrt::Microsoft::UI::Composition::CompositionObject{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Stretch() const
    {
        winrt::Microsoft::UI::Xaml::Media::Stretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Stretch(winrt::Microsoft::UI::Xaml::Media::Stretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Pause() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Pause());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->Pause());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::PlayAsync(double fromProgress, double toProgress, bool looped) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PlayAsync(fromProgress, toProgress, looped, &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->PlayAsync(fromProgress, toProgress, looped, &operation));
        }
        return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Resume() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Resume());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->Resume());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::SetProgress(double progress) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetProgress(progress));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->SetProgress(progress));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer<D>::Stop() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Stop());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>**)this;
            check_hresult(_winrt_abi_type->Stop());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer2<D>::AnimationOptimization() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PlayerAnimationOptimization value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnimationOptimization(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>**)this;
            check_hresult(_winrt_abi_type->get_AnimationOptimization(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayer2<D>::AnimationOptimization(winrt::Microsoft::UI::Xaml::Controls::PlayerAnimationOptimization const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AnimationOptimization(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>**)this;
            check_hresult(_winrt_abi_type->put_AnimationOptimization(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::AutoPlayProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoPlayProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_AutoPlayProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::DiagnosticsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DiagnosticsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DiagnosticsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::DurationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DurationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DurationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::FallbackContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FallbackContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_FallbackContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::IsAnimatedVisualLoadedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAnimatedVisualLoadedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsAnimatedVisualLoadedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::IsPlayingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlayingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPlayingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::PlaybackRateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaybackRateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaybackRateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics<D>::StretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualPlayerStatics2<D>::AnimationOptimizationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnimationOptimizationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2>**)this;
            check_hresult(_winrt_abi_type->get_AnimationOptimizationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualSource<D>::TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const& compositor, winrt::Windows::Foundation::IInspectable& diagnostics) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryCreateAnimatedVisual(*(void**)(&compositor), impl::bind_out(diagnostics), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>**)this;
            check_hresult(_winrt_abi_type->TryCreateAnimatedVisual(*(void**)(&compositor), impl::bind_out(diagnostics), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualSource2<D>::Markers() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Markers(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>**)this;
            check_hresult(_winrt_abi_type->get_Markers(&value));
        }
        return winrt::Windows::Foundation::Collections::IMapView<hstring, double>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualSource2<D>::SetColorProperty(param::hstring const& propertyName, winrt::Windows::UI::Color const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetColorProperty(*(void**)(&propertyName), impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>**)this;
            check_hresult(_winrt_abi_type->SetColorProperty(*(void**)(&propertyName), impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnimatedVisualSource3<D>::TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const& compositor, winrt::Windows::Foundation::IInspectable& diagnostics, bool createAnimations) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryCreateAnimatedVisual(*(void**)(&compositor), impl::bind_out(diagnostics), createAnimations, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3>**)this;
            check_hresult(_winrt_abi_type->TryCreateAnimatedVisual(*(void**)(&compositor), impl::bind_out(diagnostics), createAnimations, &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::ScrollController() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollController(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_ScrollController(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::Labels() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Labels(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_Labels(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::Labels(param::vector<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Labels(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_Labels(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::LabelTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_LabelTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::IElementFactory{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::LabelTemplate(winrt::Microsoft::UI::Xaml::IElementFactory const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LabelTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_LabelTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::DetailLabelTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DetailLabelTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_DetailLabelTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::IElementFactory{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::DetailLabelTemplate(winrt::Microsoft::UI::Xaml::IElementFactory const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DetailLabelTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_DetailLabelTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::SmallChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::SmallChange(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::Scrolling(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Scrolling(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->add_Scrolling(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::Scrolling(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Scrolling_revoker>(this, Scrolling(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::Scrolling(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Scrolling(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            _winrt_abi_type->remove_Scrolling(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::DetailLabelRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarDetailLabelRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DetailLabelRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            check_hresult(_winrt_abi_type->add_DetailLabelRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::DetailLabelRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarDetailLabelRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DetailLabelRequested_revoker>(this, DetailLabelRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBar<D>::DetailLabelRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DetailLabelRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>**)this;
            _winrt_abi_type->remove_DetailLabelRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarDetailLabelRequestedEventArgs<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarDetailLabelRequestedEventArgs<D>::Content(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarDetailLabelRequestedEventArgs<D>::ScrollOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarLabel<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarLabel<D>::ScrollOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>**)this;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarLabelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& content, double scrollOffset) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&content), scrollOffset, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&content), scrollOffset, &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarScrollingEventArgs<D>::ScrollOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ScrollOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarScrollingEventArgs<D>::ScrollingEventKind() const
    {
        winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventKind value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollingEventKind(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ScrollingEventKind(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarScrollingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarScrollingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarStatics<D>::LabelsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarStatics<D>::LabelTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarStatics<D>::DetailLabelTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DetailLabelTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_DetailLabelTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAnnotatedScrollBarStatics<D>::SmallChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_SmallChangeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::IsOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::IsSticky() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSticky(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->get_IsSticky(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::IsSticky(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSticky(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->put_IsSticky(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::ClosedDisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::AppBarClosedDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClosedDisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->get_ClosedDisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::ClosedDisplayMode(winrt::Microsoft::UI::Xaml::Controls::AppBarClosedDisplayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ClosedDisplayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->put_ClosedDisplayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opening(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Opening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->add_Opening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opening(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Opening_revoker>(this, Opening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Opening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            _winrt_abi_type->remove_Opening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opened(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opened(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Opened_revoker>(this, Opened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closing(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closing(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Closing_revoker>(this, Closing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closed(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBar<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBar>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::Label() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Label(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->get_Label(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::Label(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Label(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->put_Label(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::LabelPosition() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->get_LabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::LabelPosition(winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LabelPosition(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->put_LabelPosition(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::KeyboardAcceleratorTextOverride() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::KeyboardAcceleratorTextOverride(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButton<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarButtonTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBarButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::LabelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::LabelPositionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelPositionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelPositionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::KeyboardAcceleratorTextOverrideProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::IsCompactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::IsInOverflowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarButtonStatics<D>::DynamicOverflowOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarElementContainerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBarElementContainer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarElementContainerStatics<D>::IsCompactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarElementContainerStatics<D>::IsInOverflowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarElementContainerStatics<D>::DynamicOverflowOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarOverrides<D>::OnClosed(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnClosed(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)this;
            check_hresult(_winrt_abi_type->OnClosed(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarOverrides<D>::OnOpened(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnOpened(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)this;
            check_hresult(_winrt_abi_type->OnOpened(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarOverrides<D>::OnClosing(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnClosing(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)this;
            check_hresult(_winrt_abi_type->OnClosing(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarOverrides<D>::OnOpening(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnOpening(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>**)this;
            check_hresult(_winrt_abi_type->OnOpening(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarSeparatorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBarSeparator{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarSeparatorStatics<D>::IsCompactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarSeparatorStatics<D>::IsInOverflowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarSeparatorStatics<D>::DynamicOverflowOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>**)this;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarStatics<D>::IsStickyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsStickyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsStickyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarStatics<D>::ClosedDisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClosedDisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ClosedDisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::Label() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Label(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_Label(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::Label(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Label(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_Label(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::LabelPosition() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_LabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::LabelPosition(winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LabelPosition(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_LabelPosition(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::KeyboardAcceleratorTextOverride() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::KeyboardAcceleratorTextOverride(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButton<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarToggleButtonTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBarToggleButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::LabelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::LabelPositionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LabelPositionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_LabelPositionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::KeyboardAcceleratorTextOverrideProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::IsCompactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::IsInOverflowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsInOverflowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAppBarToggleButtonStatics<D>::DynamicOverflowOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::MaxSuggestionListHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSuggestionListHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_MaxSuggestionListHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::MaxSuggestionListHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxSuggestionListHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_MaxSuggestionListHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::IsSuggestionListOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSuggestionListOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_IsSuggestionListOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::IsSuggestionListOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSuggestionListOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_IsSuggestionListOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextMemberPath() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextMemberPath(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_TextMemberPath(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextMemberPath(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextMemberPath(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_TextMemberPath(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::UpdateTextOnSelect() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UpdateTextOnSelect(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_UpdateTextOnSelect(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::UpdateTextOnSelect(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UpdateTextOnSelect(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_UpdateTextOnSelect(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::AutoMaximizeSuggestionArea() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoMaximizeSuggestionArea(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_AutoMaximizeSuggestionArea(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::AutoMaximizeSuggestionArea(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AutoMaximizeSuggestionArea(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_AutoMaximizeSuggestionArea(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextBoxStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextBoxStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_TextBoxStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextBoxStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextBoxStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_TextBoxStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::QueryIcon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_QueryIcon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_QueryIcon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::QueryIcon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_QueryIcon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_QueryIcon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::SuggestionChosen(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SuggestionChosen(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->add_SuggestionChosen(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::SuggestionChosen(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SuggestionChosen_revoker>(this, SuggestionChosen(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::SuggestionChosen(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SuggestionChosen(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            _winrt_abi_type->remove_SuggestionChosen(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextChanged_revoker>(this, TextChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::TextChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::QuerySubmitted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_QuerySubmitted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            check_hresult(_winrt_abi_type->add_QuerySubmitted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::QuerySubmitted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, QuerySubmitted_revoker>(this, QuerySubmitted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBox<D>::QuerySubmitted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_QuerySubmitted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>**)this;
            _winrt_abi_type->remove_QuerySubmitted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxQuerySubmittedEventArgs<D>::QueryText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_QueryText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_QueryText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxQuerySubmittedEventArgs<D>::ChosenSuggestion() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChosenSuggestion(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ChosenSuggestion(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::MaxSuggestionListHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSuggestionListHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxSuggestionListHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::IsSuggestionListOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSuggestionListOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSuggestionListOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::TextMemberPathProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextMemberPathProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextMemberPathProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::UpdateTextOnSelectProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UpdateTextOnSelectProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_UpdateTextOnSelectProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::AutoMaximizeSuggestionAreaProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoMaximizeSuggestionAreaProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_AutoMaximizeSuggestionAreaProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::TextBoxStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextBoxStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextBoxStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::QueryIconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_QueryIconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_QueryIconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxSuggestionChosenEventArgs<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxTextChangedEventArgs<D>::Reason() const
    {
        winrt::Microsoft::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxTextChangedEventArgs<D>::Reason(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Reason(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Reason(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxTextChangedEventArgs<D>::CheckCurrent() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CheckCurrent(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->CheckCurrent(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IAutoSuggestBoxTextChangedEventArgsStatics<D>::ReasonProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReasonProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReasonProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIcon<D>::UriSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UriSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)this;
            check_hresult(_winrt_abi_type->get_UriSource(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIcon<D>::UriSource(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UriSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)this;
            check_hresult(_winrt_abi_type->put_UriSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIcon<D>::ShowAsMonochrome() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAsMonochrome(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)this;
            check_hresult(_winrt_abi_type->get_ShowAsMonochrome(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIcon<D>::ShowAsMonochrome(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowAsMonochrome(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>**)this;
            check_hresult(_winrt_abi_type->put_ShowAsMonochrome(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::BitmapIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSource<D>::UriSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UriSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)this;
            check_hresult(_winrt_abi_type->get_UriSource(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSource<D>::UriSource(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UriSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)this;
            check_hresult(_winrt_abi_type->put_UriSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSource<D>::ShowAsMonochrome() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAsMonochrome(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)this;
            check_hresult(_winrt_abi_type->get_ShowAsMonochrome(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSource<D>::ShowAsMonochrome(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowAsMonochrome(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>**)this;
            check_hresult(_winrt_abi_type->put_ShowAsMonochrome(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::BitmapIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSourceStatics<D>::UriSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UriSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_UriSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconSourceStatics<D>::ShowAsMonochromeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAsMonochromeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowAsMonochromeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconStatics<D>::UriSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UriSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_UriSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBitmapIconStatics<D>::ShowAsMonochromeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAsMonochromeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowAsMonochromeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Child() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::Child(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::ChildTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_ChildTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::ChildTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ChildTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_ChildTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BackgroundTransition() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        return winrt::Microsoft::UI::Xaml::BrushTransition{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorder<D>::BackgroundTransition(winrt::Microsoft::UI::Xaml::BrushTransition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorder, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorder>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBorderStatics<D>::ChildTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>**)this;
            check_hresult(_winrt_abi_type->get_ChildTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemTemplate(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemClicked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar, winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItemClickedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemClicked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            check_hresult(_winrt_abi_type->add_ItemClicked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemClicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar, winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItemClickedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemClicked_revoker>(this, ItemClicked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBar<D>::ItemClicked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemClicked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>**)this;
            _winrt_abi_type->remove_ItemClicked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarItemClickedEventArgs<D>::Index() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Index(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Index(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarItemClickedEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IBreadcrumbBarStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IButton<D>::Flyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Flyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButton>**)this;
            check_hresult(_winrt_abi_type->get_Flyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IButton<D>::Flyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Flyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButton>**)this;
            check_hresult(_winrt_abi_type->put_Flyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Button{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IButtonStatics<D>::FlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Date() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Date(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Date(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Date(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Date(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Date(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsCalendarOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCalendarOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_IsCalendarOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsCalendarOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsCalendarOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_IsCalendarOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DateFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_DateFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DateFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DateFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_DateFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarViewStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarViewStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_CalendarViewStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarViewStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarViewStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_CalendarViewStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::MinDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MinDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::MinDate(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinDate(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MinDate(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::MaxDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MaxDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::MaxDate(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxDate(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MaxDate(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsTodayHighlighted() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTodayHighlighted(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_IsTodayHighlighted(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsTodayHighlighted(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTodayHighlighted(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_IsTodayHighlighted(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DisplayMode(winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::FirstDayOfWeek() const
    {
        winrt::Windows::Globalization::DayOfWeek value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeek(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeek(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::FirstDayOfWeek(winrt::Windows::Globalization::DayOfWeek const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstDayOfWeek(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_FirstDayOfWeek(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DayOfWeekFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DayOfWeekFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayOfWeekFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_DayOfWeekFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsOutOfScopeEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsOutOfScopeEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOutOfScopeEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_IsOutOfScopeEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsGroupLabelVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::IsGroupLabelVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsGroupLabelVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_IsGroupLabelVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarViewDayItemChanging(winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CalendarViewDayItemChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_CalendarViewDayItemChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarViewDayItemChanging(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, CalendarViewDayItemChanging_revoker>(this, CalendarViewDayItemChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::CalendarViewDayItemChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CalendarViewDayItemChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            _winrt_abi_type->remove_CalendarViewDayItemChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DateChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker, winrt::Microsoft::UI::Xaml::Controls::CalendarDatePickerDateChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DateChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_DateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker, winrt::Microsoft::UI::Xaml::Controls::CalendarDatePickerDateChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DateChanged_revoker>(this, DateChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::DateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DateChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            _winrt_abi_type->remove_DateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Opened(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Opened(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Opened_revoker>(this, Opened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Closed(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::SetDisplayDate(winrt::Windows::Foundation::DateTime const& date) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDisplayDate(impl::bind_in(date)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->SetDisplayDate(impl::bind_in(date)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePicker<D>::SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetYearDecadeDisplayDimensions(columns, rows));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>**)this;
            check_hresult(_winrt_abi_type->SetYearDecadeDisplayDimensions(columns, rows));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerDateChangedEventArgs<D>::NewDate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewDate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewDate(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerDateChangedEventArgs<D>::OldDate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldDate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldDate(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::DateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::IsCalendarOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCalendarOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCalendarOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::DateFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DateFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::CalendarViewStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarViewStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarViewStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::MinDateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinDateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinDateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::MaxDateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxDateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::IsTodayHighlightedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTodayHighlightedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTodayHighlightedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::DisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::FirstDayOfWeekProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeekProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeekProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::DayOfWeekFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::CalendarIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::IsOutOfScopeEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarDatePickerStatics<D>::IsGroupLabelVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayOfWeekFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayOfWeekFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayOfWeekFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayOfWeekFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsGroupLabelVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsGroupLabelVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsGroupLabelVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_IsGroupLabelVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DisplayMode(winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstDayOfWeek() const
    {
        winrt::Windows::Globalization::DayOfWeek value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeek(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeek(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstDayOfWeek(winrt::Windows::Globalization::DayOfWeek const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstDayOfWeek(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstDayOfWeek(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsOutOfScopeEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsOutOfScopeEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOutOfScopeEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_IsOutOfScopeEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsTodayHighlighted() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTodayHighlighted(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_IsTodayHighlighted(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::IsTodayHighlighted(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTodayHighlighted(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_IsTodayHighlighted(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MaxDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MaxDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MaxDate(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxDate(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MaxDate(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MinDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MinDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MinDate(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinDate(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MinDate(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::NumberOfWeeksInView() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberOfWeeksInView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_NumberOfWeeksInView(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::NumberOfWeeksInView(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NumberOfWeeksInView(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_NumberOfWeeksInView(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDates() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDates(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDates(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FocusBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FocusBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FocusBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FocusBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FocusBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedHoverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedHoverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedHoverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedHoverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedHoverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedHoverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedPressedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedPressedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPressedBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPressedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDisabledBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDisabledBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedDisabledBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedDisabledBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HoverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HoverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_HoverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HoverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HoverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_HoverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::PressedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_PressedBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::PressedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PressedBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_PressedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodaySelectedInnerBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodaySelectedInnerBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodaySelectedInnerBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodaySelectedInnerBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodaySelectedInnerBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodaySelectedInnerBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutStrikethroughBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutStrikethroughBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutStrikethroughBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutStrikethroughBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BlackoutStrikethroughBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_BlackoutStrikethroughBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BlackoutBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_BlackoutBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OutOfScopeBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_OutOfScopeBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemHoverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemHoverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemHoverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemHoverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemHoverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemHoverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemPressedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemPressedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemPressedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemPressedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemPressedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemPressedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemDisabledBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemDisabledBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemDisabledBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemDisabledBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemDisabledBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemDisabledBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBlackoutBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBlackoutBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayBlackoutBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBlackoutBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayBlackoutBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayBlackoutBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayHoverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayHoverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayHoverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayHoverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayHoverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayHoverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayPressedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayPressedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayPressedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayPressedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayPressedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayPressedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayDisabledBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayDisabledBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayDisabledBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayDisabledBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayDisabledBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayDisabledBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::PressedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_PressedForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::PressedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PressedForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_PressedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::BlackoutForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BlackoutForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_BlackoutForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBlackoutForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBlackoutForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayBlackoutForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayBlackoutForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayBlackoutForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayBlackoutForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedHoverForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedHoverForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedHoverForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedHoverForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedHoverForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedHoverForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedPressedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedPressedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPressedForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPressedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDisabledForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDisabledForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedDisabledForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedDisabledForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OutOfScopeForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_OutOfScopeForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeHoverForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeHoverForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeHoverForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopeHoverForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OutOfScopeHoverForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_OutOfScopeHoverForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopePressedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopePressedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopePressedForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::OutOfScopePressedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OutOfScopePressedForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_OutOfScopePressedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DisabledForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DisabledForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DisabledForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DisabledForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayItemFontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayItemFontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayItemFontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayItemFontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayItemFontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayItemFontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemFontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayItemFontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayItemFontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_TodayFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::TodayFontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TodayFontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_TodayFontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelFontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelFontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemFontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MonthYearItemFontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelFontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelFontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_DayItemMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::DayItemMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayItemMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_DayItemMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::MonthYearItemMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthYearItemMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_MonthYearItemMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfMonthLabelMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfMonthLabelMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::FirstOfYearDecadeLabelMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_FirstOfYearDecadeLabelMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HorizontalDayItemAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalDayItemAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalDayItemAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HorizontalDayItemAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalDayItemAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalDayItemAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::VerticalDayItemAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalDayItemAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalDayItemAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::VerticalDayItemAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalDayItemAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalDayItemAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HorizontalFirstOfMonthLabelAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalFirstOfMonthLabelAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalFirstOfMonthLabelAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::HorizontalFirstOfMonthLabelAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalFirstOfMonthLabelAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalFirstOfMonthLabelAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::VerticalFirstOfMonthLabelAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalFirstOfMonthLabelAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalFirstOfMonthLabelAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::VerticalFirstOfMonthLabelAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalFirstOfMonthLabelAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalFirstOfMonthLabelAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemBorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemBorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemBorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarViewDayItemStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarViewDayItemStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarViewDayItemStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarViewDayItemStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarViewDayItemStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarViewDayItemStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemCornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemCornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemCornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarItemCornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarItemCornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->put_CalendarItemCornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarViewDayItemChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CalendarViewDayItemChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->add_CalendarViewDayItemChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarViewDayItemChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CalendarViewDayItemChanging_revoker>(this, CalendarViewDayItemChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::CalendarViewDayItemChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CalendarViewDayItemChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            _winrt_abi_type->remove_CalendarViewDayItemChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDatesChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectedDatesChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectedDatesChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->add_SelectedDatesChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDatesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectedDatesChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectedDatesChanged_revoker>(this, SelectedDatesChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SelectedDatesChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectedDatesChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            _winrt_abi_type->remove_SelectedDatesChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SetDisplayDate(winrt::Windows::Foundation::DateTime const& date) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDisplayDate(impl::bind_in(date)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->SetDisplayDate(impl::bind_in(date)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarView<D>::SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetYearDecadeDisplayDimensions(columns, rows));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarView>**)this;
            check_hresult(_winrt_abi_type->SetYearDecadeDisplayDimensions(columns, rows));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItem<D>::IsBlackout() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBlackout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)this;
            check_hresult(_winrt_abi_type->get_IsBlackout(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItem<D>::IsBlackout(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsBlackout(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)this;
            check_hresult(_winrt_abi_type->put_IsBlackout(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItem<D>::Date() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)this;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItem<D>::SetDensityColors(param::iterable<winrt::Windows::UI::Color> const& colors) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDensityColors(*(void**)(&colors)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>**)this;
            check_hresult(_winrt_abi_type->SetDensityColors(*(void**)(&colors)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemChangingEventArgs<D>::InRecycleQueue() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InRecycleQueue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InRecycleQueue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemChangingEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemChangingEventArgs<D>::Phase() const
    {
        uint32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Phase(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Phase(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemChangingEventArgs<D>::RegisterUpdateCallback(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const& callback) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterUpdateCallback(*(void**)(&callback)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->RegisterUpdateCallback(*(void**)(&callback)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemChangingEventArgs<D>::RegisterUpdateCallback(uint32_t callbackPhase, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const& callback) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterUpdateCallbackWithPhase(callbackPhase, *(void**)(&callback)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->RegisterUpdateCallbackWithPhase(callbackPhase, *(void**)(&callback)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemStatics<D>::IsBlackoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBlackoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsBlackoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewDayItemStatics<D>::DateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CalendarView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewSelectedDatesChangedEventArgs<D>::AddedDates() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddedDates(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AddedDates(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewSelectedDatesChangedEventArgs<D>::RemovedDates() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RemovedDates(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RemovedDates(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayOfWeekFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayOfWeekFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::IsGroupLabelVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupLabelVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstDayOfWeekProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeekProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstDayOfWeekProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::IsOutOfScopeEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOutOfScopeEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::IsTodayHighlightedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTodayHighlightedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTodayHighlightedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MaxDateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxDateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MinDateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinDateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinDateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::NumberOfWeeksInViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberOfWeeksInViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_NumberOfWeeksInViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedDatesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDatesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDatesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FocusBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FocusBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedHoverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedHoverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedHoverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedPressedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedDisabledBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::HoverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HoverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HoverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::PressedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PressedBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodaySelectedInnerBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodaySelectedInnerBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodaySelectedInnerBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::BlackoutStrikethroughBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutStrikethroughBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutStrikethroughBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::BlackoutBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::OutOfScopeBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemHoverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemHoverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemHoverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemPressedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemPressedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemPressedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemDisabledBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemDisabledBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemDisabledBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayBlackoutBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBlackoutBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayBlackoutBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayHoverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayHoverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayHoverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayPressedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayPressedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayPressedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayDisabledBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayDisabledBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayDisabledBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::PressedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PressedForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::BlackoutForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BlackoutForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_BlackoutForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayBlackoutForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayBlackoutForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayBlackoutForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedHoverForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedHoverForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedHoverForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedPressedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::SelectedDisabledForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::OutOfScopeForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::OutOfScopeHoverForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopeHoverForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopeHoverForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::OutOfScopePressedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OutOfScopePressedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OutOfScopePressedForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DisabledForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayItemFontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayItemFontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayItemFontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayItemFontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemFontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayItemFontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::TodayFontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TodayFontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TodayFontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfMonthLabelFontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfMonthLabelFontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfMonthLabelFontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfMonthLabelFontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelFontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MonthYearItemFontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MonthYearItemFontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MonthYearItemFontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MonthYearItemFontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemFontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfYearDecadeLabelFontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfYearDecadeLabelFontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfYearDecadeLabelFontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfYearDecadeLabelFontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelFontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::DayItemMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayItemMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayItemMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::MonthYearItemMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthYearItemMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthYearItemMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfMonthLabelMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfMonthLabelMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::FirstOfYearDecadeLabelMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FirstOfYearDecadeLabelMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::HorizontalDayItemAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalDayItemAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalDayItemAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::VerticalDayItemAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalDayItemAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalDayItemAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::HorizontalFirstOfMonthLabelAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalFirstOfMonthLabelAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalFirstOfMonthLabelAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::VerticalFirstOfMonthLabelAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalFirstOfMonthLabelAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalFirstOfMonthLabelAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemBorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemBorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarViewDayItemStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarViewDayItemStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarViewDayItemStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICalendarViewStatics<D>::CalendarItemCornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarItemCornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarItemCornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICandidateWindowBoundsChangedEventArgs<D>::Bounds() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Bounds(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Bounds(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Canvas{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::LeftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::GetLeft(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        double result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLeft(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->GetLeft(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::SetLeft(winrt::Microsoft::UI::Xaml::UIElement const& element, double length) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetLeft(*(void**)(&element), length));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->SetLeft(*(void**)(&element), length));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::TopProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::GetTop(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        double result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTop(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->GetTop(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::SetTop(winrt::Microsoft::UI::Xaml::UIElement const& element, double length) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTop(*(void**)(&element), length));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->SetTop(*(void**)(&element), length));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::ZIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::GetZIndex(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetZIndex(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->GetZIndex(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICanvasStatics<D>::SetZIndex(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetZIndex(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>**)this;
            check_hresult(_winrt_abi_type->SetZIndex(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICheckBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CheckBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingGroupHeaderContainerEventArgs<D>::GroupHeaderContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupHeaderContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_GroupHeaderContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingGroupHeaderContainerEventArgs<D>::GroupHeaderContainer(winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupHeaderContainer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_GroupHeaderContainer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingGroupHeaderContainerEventArgs<D>::GroupIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_GroupIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingGroupHeaderContainerEventArgs<D>::Group() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Group(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Group(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::ItemIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::ItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::ItemContainer(winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::IsContainerPrepared() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsContainerPrepared(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsContainerPrepared(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IChoosingItemContainerEventArgs<D>::IsContainerPrepared(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsContainerPrepared(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_IsContainerPrepared(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICleanUpVirtualizedItemEventArgs<D>::Value() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICleanUpVirtualizedItemEventArgs<D>::UIElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UIElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_UIElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICleanUpVirtualizedItemEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICleanUpVirtualizedItemEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorChangedEventArgs<D>::OldColor() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldColor(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldColor(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorChangedEventArgs<D>::NewColor() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewColor(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewColor(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::Color() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Color(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_Color(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::Color(winrt::Windows::UI::Color const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Color(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_Color(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::PreviousColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_PreviousColor(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::UI::Color>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::PreviousColor(winrt::Windows::Foundation::IReference<winrt::Windows::UI::Color> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreviousColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_PreviousColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsAlphaEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsAlphaEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorSpectrumVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorSpectrumVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsColorSpectrumVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorSpectrumVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorSpectrumVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsColorSpectrumVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorPreviewVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorPreviewVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsColorPreviewVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorPreviewVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorPreviewVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsColorPreviewVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorSliderVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorSliderVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsColorSliderVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorSliderVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorSliderVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsColorSliderVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaSliderVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaSliderVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaSliderVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaSliderVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsAlphaSliderVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsAlphaSliderVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsMoreButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsMoreButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsMoreButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsMoreButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsMoreButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsMoreButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorChannelTextInputVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorChannelTextInputVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsColorChannelTextInputVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsColorChannelTextInputVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorChannelTextInputVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsColorChannelTextInputVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaTextInputVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaTextInputVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaTextInputVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsAlphaTextInputVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsAlphaTextInputVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsAlphaTextInputVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsHexInputVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHexInputVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_IsHexInputVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::IsHexInputVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHexInputVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_IsHexInputVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinHue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MinHue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinHue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinHue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MinHue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxHue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MaxHue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxHue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxHue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MaxHue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinSaturation() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinSaturation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MinSaturation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinSaturation(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinSaturation(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MinSaturation(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxSaturation() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSaturation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MaxSaturation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxSaturation(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxSaturation(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MaxSaturation(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinValue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MinValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MinValue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MinValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxValue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_MaxValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::MaxValue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_MaxValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorSpectrumShape() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorSpectrumShape(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_ColorSpectrumShape(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorSpectrumShape(winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ColorSpectrumShape(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_ColorSpectrumShape(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorSpectrumComponents() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorSpectrumComponents(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->get_ColorSpectrumComponents(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorSpectrumComponents(winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ColorSpectrumComponents(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->put_ColorSpectrumComponents(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ColorPicker, winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ColorChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            check_hresult(_winrt_abi_type->add_ColorChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ColorPicker, winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ColorChanged_revoker>(this, ColorChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker<D>::ColorChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ColorChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker>**)this;
            _winrt_abi_type->remove_ColorChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker2<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPicker2<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ColorPicker{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::ColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::PreviousColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreviousColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsAlphaEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsColorSpectrumVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorSpectrumVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorSpectrumVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsColorPreviewVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorPreviewVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorPreviewVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsColorSliderVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorSliderVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorSliderVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsAlphaSliderVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaSliderVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaSliderVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsMoreButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsMoreButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsMoreButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsColorChannelTextInputVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorChannelTextInputVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorChannelTextInputVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsAlphaTextInputVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAlphaTextInputVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsAlphaTextInputVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::IsHexInputVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHexInputVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHexInputVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MinHueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinHueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MaxHueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxHueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MinSaturationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinSaturationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinSaturationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MaxSaturationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSaturationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxSaturationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MinValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::MaxValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::ColorSpectrumShapeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorSpectrumShapeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColorSpectrumShapeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics<D>::ColorSpectrumComponentsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorSpectrumComponentsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColorSpectrumComponentsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColorPickerStatics2<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::Width() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Width(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->get_Width(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::Width(winrt::Microsoft::UI::Xaml::GridLength const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Width(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->put_Width(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::MaxWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->get_MaxWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::MaxWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->put_MaxWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::MinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->get_MinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::MinWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->put_MinWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinition<D>::ActualWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>**)this;
            check_hresult(_winrt_abi_type->get_ActualWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinitionStatics<D>::WidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_WidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinitionStatics<D>::MaxWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IColumnDefinitionStatics<D>::MinWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsDropDownOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDropDownOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_IsDropDownOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsDropDownOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDropDownOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_IsDropDownOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsEditable() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsEditable(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_IsEditable(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsEditable(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsEditable(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_IsEditable(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsSelectionBoxHighlighted() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelectionBoxHighlighted(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_IsSelectionBoxHighlighted(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::MaxDropDownHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDropDownHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_MaxDropDownHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::MaxDropDownHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxDropDownHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_MaxDropDownHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::SelectionBoxItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionBoxItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionBoxItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::SelectionBoxItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionBoxItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionBoxItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsTextSearchEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSearchEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSearchEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::IsTextSearchEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextSearchEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_IsTextSearchEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::SelectionChangedTrigger() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ComboBoxSelectionChangedTrigger value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionChangedTrigger(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionChangedTrigger(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::SelectionChangedTrigger(winrt::Microsoft::UI::Xaml::Controls::ComboBoxSelectionChangedTrigger const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionChangedTrigger(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionChangedTrigger(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::PlaceholderForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::PlaceholderForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TextBoxStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextBoxStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_TextBoxStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TextBoxStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextBoxStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_TextBoxStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownClosed(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DropDownClosed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->add_DropDownClosed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownClosed(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, DropDownClosed_revoker>(this, DropDownClosed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownClosed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DropDownClosed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            _winrt_abi_type->remove_DropDownClosed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownOpened(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DropDownOpened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->add_DropDownOpened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownOpened(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, DropDownOpened_revoker>(this, DropDownOpened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::DropDownOpened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DropDownOpened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            _winrt_abi_type->remove_DropDownOpened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TextSubmitted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ComboBox, winrt::Microsoft::UI::Xaml::Controls::ComboBoxTextSubmittedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextSubmitted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            check_hresult(_winrt_abi_type->add_TextSubmitted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TextSubmitted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ComboBox, winrt::Microsoft::UI::Xaml::Controls::ComboBoxTextSubmittedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextSubmitted_revoker>(this, TextSubmitted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBox<D>::TextSubmitted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextSubmitted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBox>**)this;
            _winrt_abi_type->remove_TextSubmitted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ComboBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ComboBoxItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxOverrides<D>::OnDropDownClosed(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDropDownClosed(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDropDownClosed(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxOverrides<D>::OnDropDownOpened(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDropDownOpened(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDropDownOpened(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::IsEditableProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsEditableProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsEditableProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::IsDropDownOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDropDownOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDropDownOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::MaxDropDownHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxDropDownHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxDropDownHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::IsTextSearchEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSearchEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSearchEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::SelectionChangedTriggerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionChangedTriggerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionChangedTriggerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::PlaceholderForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::TextBoxStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextBoxStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextBoxStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxTextSubmittedEventArgs<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxTextSubmittedEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IComboBoxTextSubmittedEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::PrimaryCommands() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryCommands(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryCommands(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::SecondaryCommands() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryCommands(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryCommands(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::CommandBarOverflowPresenterStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandBarOverflowPresenterStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_CommandBarOverflowPresenterStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::CommandBarOverflowPresenterStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CommandBarOverflowPresenterStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->put_CommandBarOverflowPresenterStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::CommandBarTemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandBarTemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_CommandBarTemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::DefaultLabelPosition() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CommandBarDefaultLabelPosition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultLabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_DefaultLabelPosition(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::DefaultLabelPosition(winrt::Microsoft::UI::Xaml::Controls::CommandBarDefaultLabelPosition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultLabelPosition(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->put_DefaultLabelPosition(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::OverflowButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::OverflowButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OverflowButtonVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->put_OverflowButtonVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::IsDynamicOverflowEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDynamicOverflowEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->get_IsDynamicOverflowEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::IsDynamicOverflowEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDynamicOverflowEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->put_IsDynamicOverflowEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::DynamicOverflowItemsChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CommandBar, winrt::Microsoft::UI::Xaml::Controls::DynamicOverflowItemsChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DynamicOverflowItemsChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            check_hresult(_winrt_abi_type->add_DynamicOverflowItemsChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::DynamicOverflowItemsChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CommandBar, winrt::Microsoft::UI::Xaml::Controls::DynamicOverflowItemsChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DynamicOverflowItemsChanging_revoker>(this, DynamicOverflowItemsChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBar<D>::DynamicOverflowItemsChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DynamicOverflowItemsChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBar>**)this;
            _winrt_abi_type->remove_DynamicOverflowItemsChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarElement<D>::IsCompact() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompact(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)this;
            check_hresult(_winrt_abi_type->get_IsCompact(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarElement<D>::IsCompact(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsCompact(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)this;
            check_hresult(_winrt_abi_type->put_IsCompact(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarElement<D>::IsInOverflow() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInOverflow(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)this;
            check_hresult(_winrt_abi_type->get_IsInOverflow(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarElement<D>::DynamicOverflowOrder() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrder(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)this;
            check_hresult(_winrt_abi_type->get_DynamicOverflowOrder(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarElement<D>::DynamicOverflowOrder(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DynamicOverflowOrder(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>**)this;
            check_hresult(_winrt_abi_type->put_DynamicOverflowOrder(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CommandBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFlyout<D>::PrimaryCommands() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryCommands(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryCommands(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFlyout<D>::SecondaryCommands() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryCommands(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryCommands(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFlyout2<D>::AlwaysExpanded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlwaysExpanded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>**)this;
            check_hresult(_winrt_abi_type->get_AlwaysExpanded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFlyout2<D>::AlwaysExpanded(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AlwaysExpanded(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>**)this;
            check_hresult(_winrt_abi_type->put_AlwaysExpanded(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarFlyoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarOverflowPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::PrimaryCommandsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryCommandsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryCommandsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::SecondaryCommandsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryCommandsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryCommandsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::CommandBarOverflowPresenterStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandBarOverflowPresenterStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandBarOverflowPresenterStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::DefaultLabelPositionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultLabelPositionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultLabelPositionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::OverflowButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICommandBarStatics<D>::IsDynamicOverflowEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDynamicOverflowEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDynamicOverflowEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::ItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::InRecycleQueue() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InRecycleQueue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InRecycleQueue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::ItemIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::Phase() const
    {
        uint32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Phase(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Phase(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::RegisterUpdateCallback(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const& callback) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterUpdateCallback(*(void**)(&callback)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->RegisterUpdateCallback(*(void**)(&callback)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContainerContentChangingEventArgs<D>::RegisterUpdateCallback(uint32_t callbackPhase, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const& callback) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterUpdateCallbackWithPhase(callbackPhase, *(void**)(&callback)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->RegisterUpdateCallbackWithPhase(callbackPhase, *(void**)(&callback)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::Content(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->get_ContentTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->put_ContentTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControl<D>::ContentTemplateRoot() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateRoot(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControl>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateRoot(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ContentControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlOverrides<D>::OnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlOverrides<D>::OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnContentTemplateChanged(*(void**)(&oldContentTemplate), *(void**)(&newContentTemplate)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnContentTemplateChanged(*(void**)(&oldContentTemplate), *(void**)(&newContentTemplate)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlOverrides<D>::OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnContentTemplateSelectorChanged(*(void**)(&oldContentTemplateSelector), *(void**)(&newContentTemplateSelector)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnContentTemplateSelectorChanged(*(void**)(&oldContentTemplateSelector), *(void**)(&newContentTemplateSelector)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlStatics<D>::ContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlStatics<D>::ContentTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentControlStatics<D>::ContentTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Title(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::TitleTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_TitleTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::TitleTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TitleTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_TitleTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::FullSizeDesired() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FullSizeDesired(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_FullSizeDesired(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::FullSizeDesired(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FullSizeDesired(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_FullSizeDesired(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PrimaryButtonText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_PrimaryButtonText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SecondaryButtonText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_SecondaryButtonText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PrimaryButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_PrimaryButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SecondaryButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_SecondaryButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PrimaryButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_PrimaryButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SecondaryButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_SecondaryButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::IsPrimaryButtonEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPrimaryButtonEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_IsPrimaryButtonEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::IsPrimaryButtonEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPrimaryButtonEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_IsPrimaryButtonEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::IsSecondaryButtonEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSecondaryButtonEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_IsSecondaryButtonEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::IsSecondaryButtonEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSecondaryButtonEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_IsSecondaryButtonEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PrimaryButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_PrimaryButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SecondaryButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_SecondaryButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::DefaultButton() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ContentDialogButton value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultButton(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->get_DefaultButton(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::DefaultButton(winrt::Microsoft::UI::Xaml::Controls::ContentDialogButton const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultButton(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->put_DefaultButton(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closing_revoker>(this, Closing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Opened(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogOpenedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Opened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogOpenedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Opened_revoker>(this, Opened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PrimaryButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_PrimaryButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PrimaryButtonClick_revoker>(this, PrimaryButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::PrimaryButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PrimaryButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_PrimaryButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SecondaryButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_SecondaryButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SecondaryButtonClick_revoker>(this, SecondaryButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::SecondaryButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SecondaryButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_SecondaryButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CloseButtonClick_revoker>(this, CloseButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::CloseButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::Hide() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Hide());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->Hide());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::ShowAsync() const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAsync(&operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->ShowAsync(&operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialog<D>::ShowAsync(winrt::Microsoft::UI::Xaml::Controls::ContentDialogPlacement const& placement) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialog, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAsyncWithPlacement(static_cast<int32_t>(placement), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialog>**)this;
            check_hresult(_winrt_abi_type->ShowAsyncWithPlacement(static_cast<int32_t>(placement), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogButtonClickDeferral<D>::Complete() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Complete());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral>**)this;
            check_hresult(_winrt_abi_type->Complete());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogButtonClickEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogButtonClickEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogButtonClickEventArgs<D>::GetDeferral() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickDeferral{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosedEventArgs<D>::Result() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Result(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Result(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosingDeferral<D>::Complete() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Complete());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral>**)this;
            check_hresult(_winrt_abi_type->Complete());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosingEventArgs<D>::Result() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Result(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Result(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogClosingEventArgs<D>::GetDeferral() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingDeferral{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ContentDialog{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::TitleTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::FullSizeDesiredProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FullSizeDesiredProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_FullSizeDesiredProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::PrimaryButtonTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::SecondaryButtonTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::CloseButtonTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::PrimaryButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::SecondaryButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::CloseButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::PrimaryButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::SecondaryButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::CloseButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::IsPrimaryButtonEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPrimaryButtonEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPrimaryButtonEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::IsSecondaryButtonEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSecondaryButtonEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSecondaryButtonEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::PrimaryButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::SecondaryButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::CloseButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentDialogStatics<D>::DefaultButtonProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultButtonProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultButtonProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Content(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::ContentTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::FontStretch(winrt::Windows::UI::Text::FontStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::CharacterSpacing() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::CharacterSpacing(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::OpticalMarginAlignment() const
    {
        winrt::Microsoft::UI::Xaml::OpticalMarginAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::OpticalMarginAlignment(winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::TextLineBounds() const
    {
        winrt::Microsoft::UI::Xaml::TextLineBounds value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::TextLineBounds(winrt::Microsoft::UI::Xaml::TextLineBounds const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BackgroundTransition() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        return winrt::Microsoft::UI::Xaml::BrushTransition{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BackgroundTransition(winrt::Microsoft::UI::Xaml::BrushTransition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::TextWrapping() const
    {
        winrt::Microsoft::UI::Xaml::TextWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::TextWrapping(winrt::Microsoft::UI::Xaml::TextWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::MaxLines() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::MaxLines(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::LineStackingStrategy() const
    {
        winrt::Microsoft::UI::Xaml::LineStackingStrategy value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::LineStackingStrategy(winrt::Microsoft::UI::Xaml::LineStackingStrategy const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::LineHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::LineHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::HorizontalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::HorizontalContentAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::VerticalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenter<D>::VerticalContentAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ContentPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterOverrides<D>::OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnContentTemplateChanged(*(void**)(&oldContentTemplate), *(void**)(&newContentTemplate)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>**)this;
            check_hresult(_winrt_abi_type->OnContentTemplateChanged(*(void**)(&oldContentTemplate), *(void**)(&newContentTemplate)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterOverrides<D>::OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnContentTemplateSelectorChanged(*(void**)(&oldContentTemplateSelector), *(void**)(&newContentTemplateSelector)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>**)this;
            check_hresult(_winrt_abi_type->OnContentTemplateSelectorChanged(*(void**)(&oldContentTemplateSelector), *(void**)(&newContentTemplateSelector)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::ContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::ContentTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::ContentTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::FontStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::CharacterSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::OpticalMarginAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::TextLineBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::TextWrappingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::MaxLinesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::LineStackingStrategyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::LineHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::HorizontalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContentPresenterStatics<D>::VerticalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContextMenuEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContextMenuEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContextMenuEventArgs<D>::CursorLeft() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CursorLeft(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CursorLeft(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IContextMenuEventArgs<D>::CursorTop() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CursorTop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CursorTop(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsFocusEngagementEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFocusEngagementEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_IsFocusEngagementEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsFocusEngagementEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFocusEngagementEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_IsFocusEngagementEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsFocusEngaged() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFocusEngaged(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_IsFocusEngaged(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsFocusEngaged(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFocusEngaged(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_IsFocusEngaged(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::RequiresPointer() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RequiresPointer value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequiresPointer(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_RequiresPointer(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::RequiresPointer(winrt::Microsoft::UI::Xaml::Controls::RequiresPointer const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RequiresPointer(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_RequiresPointer(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FontStretch(winrt::Windows::UI::Text::FontStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::CharacterSpacing() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::CharacterSpacing(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_IsEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_IsEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::TabNavigation() const
    {
        winrt::Microsoft::UI::Xaml::Input::KeyboardNavigationMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabNavigation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_TabNavigation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::TabNavigation(winrt::Microsoft::UI::Xaml::Input::KeyboardNavigationMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabNavigation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_TabNavigation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Template() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Template(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_Template(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ControlTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Template(winrt::Microsoft::UI::Xaml::Controls::ControlTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Template(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_Template(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::HorizontalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::HorizontalContentAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::VerticalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::VerticalContentAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_VerticalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::DefaultStyleResourceUri() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultStyleResourceUri(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_DefaultStyleResourceUri(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::DefaultStyleResourceUri(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultStyleResourceUri(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_DefaultStyleResourceUri(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::ElementSoundMode() const
    {
        winrt::Microsoft::UI::Xaml::ElementSoundMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ElementSoundMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_ElementSoundMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::ElementSoundMode(winrt::Microsoft::UI::Xaml::ElementSoundMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ElementSoundMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_ElementSoundMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusEngaged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_FocusEngaged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->add_FocusEngaged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusEngaged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, FocusEngaged_revoker>(this, FocusEngaged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusEngaged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_FocusEngaged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            _winrt_abi_type->remove_FocusEngaged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusDisengaged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_FocusDisengaged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->add_FocusDisengaged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusDisengaged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, FocusDisengaged_revoker>(this, FocusDisengaged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::FocusDisengaged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_FocusDisengaged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            _winrt_abi_type->remove_FocusDisengaged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsEnabledChanged(winrt::Microsoft::UI::Xaml::DependencyPropertyChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsEnabledChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->add_IsEnabledChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsEnabledChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::DependencyPropertyChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, IsEnabledChanged_revoker>(this, IsEnabledChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::IsEnabledChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsEnabledChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            _winrt_abi_type->remove_IsEnabledChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::RemoveFocusEngagement() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RemoveFocusEngagement());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->RemoveFocusEngagement());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControl<D>::ApplyTemplate() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ApplyTemplate(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControl>**)this;
            check_hresult(_winrt_abi_type->ApplyTemplate(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Control{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerEntered(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerEntered(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerEntered(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerPressed(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerPressed(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerPressed(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerMoved(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerMoved(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerMoved(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerReleased(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerReleased(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerReleased(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerExited(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerExited(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerExited(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerCaptureLost(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerCaptureLost(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerCaptureLost(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerCanceled(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerCanceled(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerCanceled(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPointerWheelChanged(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPointerWheelChanged(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPointerWheelChanged(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnTapped(winrt::Microsoft::UI::Xaml::Input::TappedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnTapped(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnTapped(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnDoubleTapped(winrt::Microsoft::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDoubleTapped(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDoubleTapped(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnHolding(winrt::Microsoft::UI::Xaml::Input::HoldingRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnHolding(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnHolding(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnRightTapped(winrt::Microsoft::UI::Xaml::Input::RightTappedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnRightTapped(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnRightTapped(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnManipulationStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationStartingRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnManipulationStarting(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnManipulationStarting(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnManipulationInertiaStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationInertiaStartingRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnManipulationInertiaStarting(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnManipulationInertiaStarting(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnManipulationStarted(winrt::Microsoft::UI::Xaml::Input::ManipulationStartedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnManipulationStarted(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnManipulationStarted(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnManipulationDelta(winrt::Microsoft::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnManipulationDelta(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnManipulationDelta(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnManipulationCompleted(winrt::Microsoft::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnManipulationCompleted(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnManipulationCompleted(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnKeyUp(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnKeyUp(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnKeyDown(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnKeyDown(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPreviewKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPreviewKeyDown(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPreviewKeyDown(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnPreviewKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnPreviewKeyUp(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnPreviewKeyUp(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnGotFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnGotFocus(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnGotFocus(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnLostFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnLostFocus(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnLostFocus(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnCharacterReceived(winrt::Microsoft::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnCharacterReceived(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnCharacterReceived(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnDragEnter(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDragEnter(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDragEnter(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnDragLeave(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDragLeave(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDragLeave(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnDragOver(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDragOver(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDragOver(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlOverrides<D>::OnDrop(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnDrop(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnDrop(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlProtected<D>::DefaultStyleKey() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultStyleKey(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)this;
            check_hresult(_winrt_abi_type->get_DefaultStyleKey(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlProtected<D>::DefaultStyleKey(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultStyleKey(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)this;
            check_hresult(_winrt_abi_type->put_DefaultStyleKey(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlProtected<D>::GetTemplateChild(param::hstring const& childName) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTemplateChild(*(void**)(&childName), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlProtected>**)this;
            check_hresult(_winrt_abi_type->GetTemplateChild(*(void**)(&childName), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsFocusEngagementEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFocusEngagementEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFocusEngagementEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsFocusEngagedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFocusEngagedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFocusEngagedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::RequiresPointerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequiresPointerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_RequiresPointerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::FontStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::CharacterSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::TabNavigationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabNavigationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabNavigationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::TemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::HorizontalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::VerticalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::DefaultStyleKeyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultStyleKeyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultStyleKeyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::DefaultStyleResourceUriProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultStyleResourceUriProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultStyleResourceUriProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::ElementSoundModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ElementSoundModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ElementSoundModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsTemplateFocusTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTemplateFocusTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTemplateFocusTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::GetIsTemplateFocusTarget(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsTemplateFocusTarget(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsTemplateFocusTarget(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::SetIsTemplateFocusTarget(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsTemplateFocusTarget(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsTemplateFocusTarget(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::IsTemplateKeyTipTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTemplateKeyTipTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTemplateKeyTipTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::GetIsTemplateKeyTipTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsTemplateKeyTipTarget(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsTemplateKeyTipTarget(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlStatics<D>::SetIsTemplateKeyTipTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsTemplateKeyTipTarget(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsTemplateKeyTipTarget(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlTemplate<D>::TargetType() const
    {
        winrt::Windows::UI::Xaml::Interop::TypeName value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetType(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>**)this;
            check_hresult(_winrt_abi_type->get_TargetType(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IControlTemplate<D>::TargetType(winrt::Windows::UI::Xaml::Interop::TypeName const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TargetType(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>**)this;
            check_hresult(_winrt_abi_type->put_TargetType(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ICoreWebView2InitializedEventArgs<D>::Exception() const
    {
        winrt::hresult value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Exception(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Exception(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDataTemplateSelector<D>::SelectTemplate(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectTemplate(*(void**)(&item), *(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>**)this;
            check_hresult(_winrt_abi_type->SelectTemplate(*(void**)(&item), *(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDataTemplateSelector<D>::SelectTemplate(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectTemplateForItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>**)this;
            check_hresult(_winrt_abi_type->SelectTemplateForItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDataTemplateSelectorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDataTemplateSelectorOverrides<D>::SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectTemplateCore(*(void**)(&item), *(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>**)this;
            check_hresult(_winrt_abi_type->SelectTemplateCore(*(void**)(&item), *(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDataTemplateSelectorOverrides<D>::SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectTemplateForItemCore(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>**)this;
            check_hresult(_winrt_abi_type->SelectTemplateForItemCore(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickedEventArgs<D>::OldDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickedEventArgs<D>::NewDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::CalendarIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::CalendarIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Date() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Date(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Date(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Date(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DayVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_DayVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DayVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_DayVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MonthVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MonthVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MonthVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MonthVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::YearVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_YearVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::YearVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_YearVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_YearVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DayFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_DayFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DayFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_DayFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MonthFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MonthFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MonthFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MonthFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::YearFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_YearFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::YearFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_YearFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_YearFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MinYear() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinYear(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MinYear(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MinYear(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinYear(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MinYear(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MaxYear() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxYear(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_MaxYear(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::MaxYear(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxYear(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_MaxYear(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::SelectedDate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDate(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::SelectedDate(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedDate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->put_SelectedDate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DateChanged(winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerValueChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DateChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_DateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DateChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerValueChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DateChanged_revoker>(this, DateChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::DateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DateChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            _winrt_abi_type->remove_DateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::SelectedDateChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePicker, winrt::Microsoft::UI::Xaml::Controls::DatePickerSelectedValueChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectedDateChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            check_hresult(_winrt_abi_type->add_SelectedDateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::SelectedDateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePicker, winrt::Microsoft::UI::Xaml::Controls::DatePickerSelectedValueChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectedDateChanged_revoker>(this, SelectedDateChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePicker<D>::SelectedDateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectedDateChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePicker>**)this;
            _winrt_abi_type->remove_SelectedDateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DatePicker{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::CalendarIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::CalendarIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_CalendarIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::Date() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_Date(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::Date(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Date(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_Date(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DayVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_DayVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DayVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_DayVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MonthVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MonthVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MonthVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MonthVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::YearVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_YearVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::YearVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_YearVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_YearVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MinYear() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinYear(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MinYear(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MinYear(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinYear(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MinYear(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MaxYear() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxYear(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MaxYear(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MaxYear(winrt::Windows::Foundation::DateTime const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxYear(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MaxYear(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DayFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_DayFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DayFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DayFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_DayFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MonthFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MonthFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::MonthFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MonthFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MonthFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::YearFormat() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearFormat(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_YearFormat(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::YearFormat(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_YearFormat(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_YearFormat(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DatePicked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::DatePickedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DatePicked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->add_DatePicked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DatePicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::DatePickedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DatePicked_revoker>(this, DatePicked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::DatePicked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DatePicked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            _winrt_abi_type->remove_DatePicked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyout<D>::ShowAtAsync(winrt::Microsoft::UI::Xaml::FrameworkElement const& target) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItem<D>::PrimaryText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItem<D>::PrimaryText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PrimaryText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_PrimaryText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItem<D>::SecondaryText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItem<D>::SecondaryText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SecondaryText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_SecondaryText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItemStatics<D>::PrimaryTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PrimaryTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_PrimaryTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutItemStatics<D>::SecondaryTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SecondaryTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_SecondaryTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutPresenter<D>::IsDefaultShadowEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutPresenter<D>::IsDefaultShadowEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutPresenterStatics<D>::IsDefaultShadowEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::CalendarIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::DateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::DayVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::MonthVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::YearVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_YearVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::MinYearProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinYearProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinYearProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::MaxYearProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxYearProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxYearProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::DayFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::MonthFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerFlyoutStatics<D>::YearFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_YearFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerSelectedValueChangedEventArgs<D>::OldDate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldDate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldDate(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerSelectedValueChangedEventArgs<D>::NewDate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewDate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewDate(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::CalendarIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_CalendarIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::DateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::DayVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::MonthVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::YearVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_YearVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::DayFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DayFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_DayFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::MonthFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MonthFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MonthFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::YearFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_YearFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_YearFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::MinYearProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinYearProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinYearProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::MaxYearProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxYearProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxYearProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerStatics<D>::SelectedDateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerValueChangedEventArgs<D>::OldDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDatePickerValueChangedEventArgs<D>::NewDate() const
    {
        winrt::Windows::Foundation::DateTime value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewDate(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewDate(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsCompletedEventArgs<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsCompletedEventArgs<D>::DropResult() const
    {
        winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsStartingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsStartingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsStartingEventArgs<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDragItemsStartingEventArgs<D>::Data() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        return winrt::Windows::ApplicationModel::DataTransfer::DataPackage{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDropDownButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DropDownButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDynamicAnimatedVisualSource<D>::AnimatedVisualInvalidated(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_AnimatedVisualInvalidated(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>**)this;
            check_hresult(_winrt_abi_type->add_AnimatedVisualInvalidated(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDynamicAnimatedVisualSource<D>::AnimatedVisualInvalidated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, AnimatedVisualInvalidated_revoker>(this, AnimatedVisualInvalidated(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDynamicAnimatedVisualSource<D>::AnimatedVisualInvalidated(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>**)&_winrt_casted_result;
            _winrt_abi_type->remove_AnimatedVisualInvalidated(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>**)this;
            _winrt_abi_type->remove_AnimatedVisualInvalidated(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IDynamicOverflowItemsChangingEventArgs<D>::Action() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CommandBarDynamicOverflowAction value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Action(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Action(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::HeaderTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::HeaderTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::IsExpanded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::IsExpanded(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::ExpandDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ExpandDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::ExpandDirection(winrt::Microsoft::UI::Xaml::Controls::ExpandDirection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ExpandDirection(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->put_ExpandDirection(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Expanding(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderExpandingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Expanding(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderExpandingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Expanding_revoker>(this, Expanding(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Expanding(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Collapsed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderCollapsedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Collapsed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderCollapsedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Collapsed_revoker>(this, Collapsed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::Collapsed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpander<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpander, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpander>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ExpanderTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Expander{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderStatics<D>::HeaderTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderStatics<D>::IsExpandedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderStatics<D>::ExpandDirectionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDirectionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDirectionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderTemplateSettings<D>::ContentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IExpanderTemplateSettings<D>::NegativeContentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeContentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeContentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlipView<D>::UseTouchAnimationsForAllNavigation() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlipView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlipView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UseTouchAnimationsForAllNavigation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipView>**)this;
            check_hresult(_winrt_abi_type->get_UseTouchAnimationsForAllNavigation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlipView<D>::UseTouchAnimationsForAllNavigation(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlipView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlipView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UseTouchAnimationsForAllNavigation(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipView>**)this;
            check_hresult(_winrt_abi_type->put_UseTouchAnimationsForAllNavigation(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlipViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::FlipView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlipViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::FlipViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlipViewStatics<D>::UseTouchAnimationsForAllNavigationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UseTouchAnimationsForAllNavigationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_UseTouchAnimationsForAllNavigationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyout<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyout<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyout<D>::FlyoutPresenterStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutPresenterStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutPresenterStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyout<D>::FlyoutPresenterStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FlyoutPresenterStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyout>**)this;
            check_hresult(_winrt_abi_type->put_FlyoutPresenterStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Flyout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutPresenter<D>::IsDefaultShadowEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutPresenter<D>::IsDefaultShadowEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::FlyoutPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutPresenterStatics<D>::IsDefaultShadowEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFlyoutStatics<D>::FlyoutPresenterStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutPresenterStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutPresenterStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFocusEngagedEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFocusEngagedEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::Glyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::Glyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::MirroredWhenRightToLeft() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIcon<D>::MirroredWhenRightToLeft(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIcon>**)this;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::FontIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::Glyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::Glyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::MirroredWhenRightToLeft() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeft(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSource<D>::MirroredWhenRightToLeft(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>**)this;
            check_hresult(_winrt_abi_type->put_MirroredWhenRightToLeft(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::FontIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::GlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconSourceStatics<D>::MirroredWhenRightToLeftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::GlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFontIconStatics<D>::MirroredWhenRightToLeftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_MirroredWhenRightToLeftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::CacheSize() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_CacheSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::CacheSize(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CacheSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->put_CacheSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::CanGoBack() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoBack(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_CanGoBack(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::CanGoForward() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoForward(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_CanGoForward(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::CurrentSourcePageType() const
    {
        winrt::Windows::UI::Xaml::Interop::TypeName value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentSourcePageType(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_CurrentSourcePageType(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::SourcePageType() const
    {
        winrt::Windows::UI::Xaml::Interop::TypeName value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::SourcePageType(winrt::Windows::UI::Xaml::Interop::TypeName const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SourcePageType(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->put_SourcePageType(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::BackStackDepth() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackStackDepth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_BackStackDepth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::BackStack() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackStack(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_BackStack(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Navigation::PageStackEntry>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::ForwardStack() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForwardStack(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_ForwardStack(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Navigation::PageStackEntry>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::IsNavigationStackEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsNavigationStackEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->get_IsNavigationStackEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::IsNavigationStackEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsNavigationStackEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->put_IsNavigationStackEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigated(winrt::Microsoft::UI::Xaml::Navigation::NavigatedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Navigated(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->add_Navigated(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigated(auto_revoke_t, winrt::Microsoft::UI::Xaml::Navigation::NavigatedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Navigated_revoker>(this, Navigated(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigated(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Navigated(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            _winrt_abi_type->remove_Navigated(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigating(winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Navigating(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->add_Navigating(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigating(auto_revoke_t, winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Navigating_revoker>(this, Navigating(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigating(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Navigating(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            _winrt_abi_type->remove_Navigating(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationFailed(winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_NavigationFailed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->add_NavigationFailed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationFailed(auto_revoke_t, winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, NavigationFailed_revoker>(this, NavigationFailed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationFailed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            _winrt_abi_type->remove_NavigationFailed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            _winrt_abi_type->remove_NavigationFailed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationStopped(winrt::Microsoft::UI::Xaml::Navigation::NavigationStoppedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_NavigationStopped(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->add_NavigationStopped(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationStopped(auto_revoke_t, winrt::Microsoft::UI::Xaml::Navigation::NavigationStoppedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, NavigationStopped_revoker>(this, NavigationStopped(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigationStopped(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            _winrt_abi_type->remove_NavigationStopped(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            _winrt_abi_type->remove_NavigationStopped(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::GoBack() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GoBack());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->GoBack());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::GoBack(winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo const& transitionInfoOverride) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GoBackWithTransitionInfo(*(void**)(&transitionInfoOverride)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->GoBackWithTransitionInfo(*(void**)(&transitionInfoOverride)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::GoForward() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GoForward());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->GoForward());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigate(winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType, winrt::Windows::Foundation::IInspectable const& parameter) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Navigate(impl::bind_in(sourcePageType), *(void**)(&parameter), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->Navigate(impl::bind_in(sourcePageType), *(void**)(&parameter), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::Navigate(winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType, winrt::Windows::Foundation::IInspectable const& parameter, winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo const& infoOverride) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->NavigateWithTransitionInfo(impl::bind_in(sourcePageType), *(void**)(&parameter), *(void**)(&infoOverride), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->NavigateWithTransitionInfo(impl::bind_in(sourcePageType), *(void**)(&parameter), *(void**)(&infoOverride), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::NavigateToType(winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType, winrt::Windows::Foundation::IInspectable const& parameter, winrt::Microsoft::UI::Xaml::Navigation::FrameNavigationOptions const& navigationOptions) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->NavigateToType(impl::bind_in(sourcePageType), *(void**)(&parameter), *(void**)(&navigationOptions), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->NavigateToType(impl::bind_in(sourcePageType), *(void**)(&parameter), *(void**)(&navigationOptions), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::GetNavigationState() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetNavigationState(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->GetNavigationState(&result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::SetNavigationState(param::hstring const& navigationState) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetNavigationState(*(void**)(&navigationState)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->SetNavigationState(*(void**)(&navigationState)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrame<D>::SetNavigationState(param::hstring const& navigationState, bool suppressNavigate) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrame, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetNavigationStateWithNavigationControl(*(void**)(&navigationState), suppressNavigate));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrame>**)this;
            check_hresult(_winrt_abi_type->SetNavigationStateWithNavigationControl(*(void**)(&navigationState), suppressNavigate));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Frame{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::CacheSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_CacheSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::CanGoBackProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoBackProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanGoBackProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::CanGoForwardProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoForwardProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanGoForwardProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::CurrentSourcePageTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentSourcePageTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_CurrentSourcePageTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::SourcePageTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourcePageTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourcePageTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::BackStackDepthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackStackDepthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackStackDepthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::BackStackProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackStackProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackStackProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::ForwardStackProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForwardStackProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForwardStackProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IFrameStatics<D>::IsNavigationStackEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsNavigationStackEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsNavigationStackEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::RowDefinitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowDefinitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_RowDefinitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RowDefinitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::ColumnDefinitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnDefinitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_ColumnDefinitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ColumnDefinitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::RowSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_RowSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::RowSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RowSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_RowSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::ColumnSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->get_ColumnSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGrid<D>::ColumnSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ColumnSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGrid>**)this;
            check_hresult(_winrt_abi_type->put_ColumnSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Grid{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::RowSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_RowSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::ColumnSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColumnSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::RowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_RowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::GetRow(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRow(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetRow(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::SetRow(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetRow(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetRow(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::ColumnProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColumnProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::GetColumn(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetColumn(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetColumn(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::SetColumn(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetColumn(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetColumn(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::RowSpanProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpanProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_RowSpanProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::GetRowSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRowSpan(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetRowSpan(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::SetRowSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetRowSpan(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetRowSpan(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::ColumnSpanProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpanProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColumnSpanProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::GetColumnSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetColumnSpan(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetColumnSpan(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridStatics<D>::SetColumnSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetColumnSpan(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetColumnSpan(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GridView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridViewHeaderItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GridViewHeaderItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridViewItem<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewItem>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::GridViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGridViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GridViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::Panel() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Panel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_Panel(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::Panel(winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Panel(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_Panel(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::ContainerStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContainerStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_ContainerStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::ContainerStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContainerStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_ContainerStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderContainerStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderContainerStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_HeaderContainerStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderContainerStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderContainerStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_HeaderContainerStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::ContainerStyleSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContainerStyleSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_ContainerStyleSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::ContainerStyleSelector(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContainerStyleSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_ContainerStyleSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HeaderTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HidesIfEmpty() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HidesIfEmpty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->get_HidesIfEmpty(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyle<D>::HidesIfEmpty(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HidesIfEmpty(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>**)this;
            check_hresult(_winrt_abi_type->put_HidesIfEmpty(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyleFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupStyle{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyleSelector<D>::SelectGroupStyle(winrt::Windows::Foundation::IInspectable const& group, uint32_t level) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectGroupStyle(*(void**)(&group), level, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector>**)this;
            check_hresult(_winrt_abi_type->SelectGroupStyle(*(void**)(&group), level, &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupStyle{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyleSelectorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IGroupStyleSelectorOverrides<D>::SelectGroupStyleCore(winrt::Windows::Foundation::IInspectable const& group, uint32_t level) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectGroupStyleCore(*(void**)(&group), level, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>**)this;
            check_hresult(_winrt_abi_type->SelectGroupStyleCore(*(void**)(&group), level, &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupStyle{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHasValidationErrorsChangedEventArgs<D>::NewValue() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::DefaultSectionIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultSectionIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_DefaultSectionIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::DefaultSectionIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultSectionIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->put_DefaultSectionIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::Sections() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Sections(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_Sections(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionsInView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SectionsInView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_SectionsInView(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionHeaders() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SectionHeaders(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->get_SectionHeaders(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionHeaderClick(winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SectionHeaderClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->add_SectionHeaderClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionHeaderClick(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SectionHeaderClick_revoker>(this, SectionHeaderClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionHeaderClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SectionHeaderClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            _winrt_abi_type->remove_SectionHeaderClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionsInViewChanged(winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SectionsInViewChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->add_SectionsInViewChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionsInViewChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SectionsInViewChanged_revoker>(this, SectionsInViewChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::SectionsInViewChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SectionsInViewChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            _winrt_abi_type->remove_SectionsInViewChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHub<D>::ScrollToSection(winrt::Microsoft::UI::Xaml::Controls::HubSection const& section) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHub>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHub, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollToSection(*(void**)(&section)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHub>**)this;
            check_hresult(_winrt_abi_type->ScrollToSection(*(void**)(&section)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Hub{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::ContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::ContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::IsHeaderInteractive() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHeaderInteractive(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->get_IsHeaderInteractive(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSection<D>::IsHeaderInteractive(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHeaderInteractive(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSection>**)this;
            check_hresult(_winrt_abi_type->put_IsHeaderInteractive(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::HubSection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionHeaderClickEventArgs<D>::Section() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Section(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Section(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::HubSection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionStatics<D>::ContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubSectionStatics<D>::IsHeaderInteractiveProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHeaderInteractiveProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHeaderInteractiveProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::DefaultSectionIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultSectionIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultSectionIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::SemanticZoomOwnerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwnerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwnerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::IsActiveViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsActiveViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsActiveViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHubStatics<D>::IsZoomedInViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHubStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHubStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHyperlinkButton<D>::NavigateUri() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NavigateUri(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>**)this;
            check_hresult(_winrt_abi_type->get_NavigateUri(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHyperlinkButton<D>::NavigateUri(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NavigateUri(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>**)this;
            check_hresult(_winrt_abi_type->put_NavigateUri(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHyperlinkButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::HyperlinkButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IHyperlinkButtonStatics<D>::NavigateUriProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NavigateUriProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_NavigateUriProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconElement<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElement>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconElement<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElement>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconElementStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSource<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSource<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSource<D>::CreateIconElement() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateIconElement(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSource>**)this;
            check_hresult(_winrt_abi_type->CreateIconElement(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceElement<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceElement<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceElementFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSourceElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceElementStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceOverrides<D>::CreateIconElementCore() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateIconElementCore(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>**)this;
            check_hresult(_winrt_abi_type->CreateIconElementCore(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceOverrides<D>::GetIconElementPropertyCore(winrt::Microsoft::UI::Xaml::DependencyProperty const& iconSourceProperty) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIconElementPropertyCore(*(void**)(&iconSourceProperty), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>**)this;
            check_hresult(_winrt_abi_type->GetIconElementPropertyCore(*(void**)(&iconSourceProperty), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IIconSourceStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::Source(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::Stretch() const
    {
        winrt::Microsoft::UI::Xaml::Media::Stretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::Stretch(winrt::Microsoft::UI::Xaml::Media::Stretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::NineGrid() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NineGrid(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->get_NineGrid(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::NineGrid(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NineGrid(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->put_NineGrid(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageFailed(winrt::Microsoft::UI::Xaml::ExceptionRoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ImageFailed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->add_ImageFailed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageFailed(auto_revoke_t, winrt::Microsoft::UI::Xaml::ExceptionRoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ImageFailed_revoker>(this, ImageFailed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageFailed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ImageFailed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            _winrt_abi_type->remove_ImageFailed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageOpened(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ImageOpened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->add_ImageOpened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageOpened(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ImageOpened_revoker>(this, ImageOpened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::ImageOpened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ImageOpened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            _winrt_abi_type->remove_ImageOpened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::GetAsCastingSource() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAsCastingSource(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->GetAsCastingSource(&result));
        }
        return winrt::Windows::Media::Casting::CastingSource{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImage<D>::GetAlphaMask() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlphaMask(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImage>**)this;
            check_hresult(_winrt_abi_type->GetAlphaMask(&result));
        }
        return winrt::Microsoft::UI::Composition::CompositionBrush{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIcon<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIcon>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIcon<D>::Source(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIcon>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ImageIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconSource<D>::ImageSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ImageSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>**)this;
            check_hresult(_winrt_abi_type->get_ImageSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconSource<D>::ImageSource(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ImageSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>**)this;
            check_hresult(_winrt_abi_type->put_ImageSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ImageIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconSourceStatics<D>::ImageSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ImageSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_ImageSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageIconStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageStatics<D>::StretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IImageStatics<D>::NineGridProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IImageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IImageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NineGridProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IImageStatics>**)this;
            check_hresult(_winrt_abi_type->get_NineGridProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadge<D>::Value() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadge<D>::Value(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadge<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadge<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadge<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBadgeTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBadge{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeStatics<D>::ValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)this;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettings<D>::InfoBadgeCornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadgeCornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_InfoBadgeCornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettings<D>::InfoBadgeCornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InfoBadgeCornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_InfoBadgeCornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettings<D>::IconElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettings<D>::IconElement(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBadgeTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettingsStatics<D>::InfoBadgeCornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadgeCornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_InfoBadgeCornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBadgeTemplateSettingsStatics<D>::IconElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Title(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Message() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Message(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_Message(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Message(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Message(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_Message(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Severity() const
    {
        winrt::Microsoft::UI::Xaml::Controls::InfoBarSeverity value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Severity(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_Severity(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Severity(winrt::Microsoft::UI::Xaml::Controls::InfoBarSeverity const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Severity(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_Severity(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsIconVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIconVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_IsIconVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsIconVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsIconVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_IsIconVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsClosable() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClosable(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_IsClosable(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::IsClosable(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsClosable(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_IsClosable(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::ActionButton() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButton(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_ActionButton(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::ActionButton(winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ActionButton(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_ActionButton(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Content(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::ContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::ContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->put_ContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, CloseButtonClick_revoker>(this, CloseButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::CloseButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closing_revoker>(this, Closing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBar<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBar>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarClosedEventArgs<D>::Reason() const
    {
        winrt::Microsoft::UI::Xaml::Controls::InfoBarCloseReason value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarClosingEventArgs<D>::Reason() const
    {
        winrt::Microsoft::UI::Xaml::Controls::InfoBarCloseReason value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::MessageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MessageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_MessageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::SeverityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SeverityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_SeverityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::IsIconVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIconVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsIconVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::IsClosableProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClosableProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsClosableProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::CloseButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::CloseButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::CloseButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::ActionButtonProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::ContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarTemplateSettings<D>::IconElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarTemplateSettings<D>::IconElement(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInfoBarTemplateSettingsStatics<D>::IconElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IInsertionPanel<D>::GetInsertionIndexes(winrt::Windows::Foundation::Point const& position, int32_t& first, int32_t& second) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetInsertionIndexes(impl::bind_in(position), &first, &second));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel>**)this;
            check_hresult(_winrt_abi_type->GetInsertionIndexes(impl::bind_in(position), &first, &second));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemClickEventArgs<D>::ClickedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClickedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ClickedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::Operation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionOperation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Operation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->get_Operation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::Triggers() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionTriggers value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Triggers(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->get_Triggers(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::OldBounds() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldBounds(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->get_OldBounds(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::NewBounds() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewBounds(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->get_NewBounds(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::HasStarted() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasStarted(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->get_HasStarted(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransition<D>::Start() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Start(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>**)this;
            check_hresult(_winrt_abi_type->Start(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProgress{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionCompletedEventArgs<D>::Transition() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Transition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Transition(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionCompletedEventArgs<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProgress<D>::Transition() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Transition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)this;
            check_hresult(_winrt_abi_type->get_Transition(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProgress<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProgress<D>::Complete() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Complete());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>**)this;
            check_hresult(_winrt_abi_type->Complete());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProvider<D>::ShouldAnimate(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const& transition) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShouldAnimate(*(void**)(&transition), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)this;
            check_hresult(_winrt_abi_type->ShouldAnimate(*(void**)(&transition), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProvider<D>::QueueTransition(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const& transition) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->QueueTransition(*(void**)(&transition)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)this;
            check_hresult(_winrt_abi_type->QueueTransition(*(void**)(&transition)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProvider<D>::TransitionCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider, winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TransitionCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)this;
            check_hresult(_winrt_abi_type->add_TransitionCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProvider<D>::TransitionCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider, winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TransitionCompleted_revoker>(this, TransitionCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProvider<D>::TransitionCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TransitionCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>**)this;
            _winrt_abi_type->remove_TransitionCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProviderFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProviderOverrides<D>::ShouldAnimateCore(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const& transition) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShouldAnimateCore(*(void**)(&transition), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>**)this;
            check_hresult(_winrt_abi_type->ShouldAnimateCore(*(void**)(&transition), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemCollectionTransitionProviderOverrides<D>::StartTransitions(param::vector<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition> const& transitions) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->StartTransitions(*(void**)(&transitions)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>**)this;
            check_hresult(_winrt_abi_type->StartTransitions(*(void**)(&transitions)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainer<D>::Child() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)this;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainer<D>::Child(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)this;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainer<D>::IsSelected() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)this;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainer<D>::IsSelected(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainer>**)this;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemContainer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ItemsChanged(winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->add_ItemsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ItemsChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ItemsChanged_revoker>(this, ItemsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ItemsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            _winrt_abi_type->remove_ItemsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ItemFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ContainerFromItem(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::IndexFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->IndexFromContainer(*(void**)(&container), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::ContainerFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::GetItemContainerGeneratorForPanel(winrt::Microsoft::UI::Xaml::Controls::Panel const& panel) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetItemContainerGeneratorForPanel(*(void**)(&panel), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->GetItemContainerGeneratorForPanel(*(void**)(&panel), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::StartAt(winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const& position, winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorDirection const& direction, bool allowStartAtRealizedItem) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->StartAt(impl::bind_in(position), static_cast<int32_t>(direction), allowStartAtRealizedItem));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->StartAt(impl::bind_in(position), static_cast<int32_t>(direction), allowStartAtRealizedItem));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::Stop() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Stop());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->Stop());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::GenerateNext(bool& isNewlyRealized) const
    {
        void* returnValue{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GenerateNext(&isNewlyRealized, &returnValue));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->GenerateNext(&isNewlyRealized, &returnValue));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ returnValue, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::PrepareItemContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PrepareItemContainer(*(void**)(&container)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->PrepareItemContainer(*(void**)(&container)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::RemoveAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RemoveAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->RemoveAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::Remove(winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const& position, int32_t count) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Remove(impl::bind_in(position), count));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->Remove(impl::bind_in(position), count));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::GeneratorPositionFromIndex(int32_t itemIndex) const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GeneratorPositionFromIndex(itemIndex, put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->GeneratorPositionFromIndex(itemIndex, put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::IndexFromGeneratorPosition(winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const& position) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexFromGeneratorPosition(impl::bind_in(position), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->IndexFromGeneratorPosition(impl::bind_in(position), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerGenerator<D>::Recycle(winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const& position, int32_t count) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Recycle(impl::bind_in(position), count));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>**)this;
            check_hresult(_winrt_abi_type->Recycle(impl::bind_in(position), count));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerMapping<D>::ItemFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)this;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerMapping<D>::ContainerFromItem(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)this;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerMapping<D>::IndexFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)this;
            check_hresult(_winrt_abi_type->IndexFromContainer(*(void**)(&container), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerMapping<D>::ContainerFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>**)this;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerStatics<D>::ChildProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ChildProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemContainerStatics<D>::IsSelectedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelectedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSelectedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemsPanel() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsPanel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemsPanel(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemsPanel(winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsPanel(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemsPanel(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::DisplayMemberPath() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMemberPath(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMemberPath(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::DisplayMemberPath(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayMemberPath(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_DisplayMemberPath(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemsPanelRoot() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsPanelRoot(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemsPanelRoot(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Panel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerStyleSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerStyleSelector(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerStyleSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerStyleSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerGenerator() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerGenerator(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerGenerator(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::ItemContainerTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::GroupStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_GroupStyle(&value));
        }
        return winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::GroupStyle>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::GroupStyleSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupStyleSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_GroupStyleSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::GroupStyleSelector(winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupStyleSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->put_GroupStyleSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::IsGrouping() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGrouping(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->get_IsGrouping(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControl<D>::GroupHeaderContainerFromItemContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& itemContainer) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GroupHeaderContainerFromItemContainer(*(void**)(&itemContainer), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControl>**)this;
            check_hresult(_winrt_abi_type->GroupHeaderContainerFromItemContainer(*(void**)(&itemContainer), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::IsItemItsOwnContainerOverride(winrt::Windows::Foundation::IInspectable const& item) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsItemItsOwnContainerOverride(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->IsItemItsOwnContainerOverride(*(void**)(&item), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::GetContainerForItemOverride() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetContainerForItemOverride(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->GetContainerForItemOverride(&result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::ClearContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ClearContainerForItemOverride(*(void**)(&element), *(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->ClearContainerForItemOverride(*(void**)(&element), *(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::PrepareContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PrepareContainerForItemOverride(*(void**)(&element), *(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->PrepareContainerForItemOverride(*(void**)(&element), *(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnItemsChanged(winrt::Windows::Foundation::IInspectable const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemsChanged(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemsChanged(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnItemContainerStyleChanged(winrt::Microsoft::UI::Xaml::Style const& oldItemContainerStyle, winrt::Microsoft::UI::Xaml::Style const& newItemContainerStyle) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemContainerStyleChanged(*(void**)(&oldItemContainerStyle), *(void**)(&newItemContainerStyle)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemContainerStyleChanged(*(void**)(&oldItemContainerStyle), *(void**)(&newItemContainerStyle)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnItemContainerStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& oldItemContainerStyleSelector, winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& newItemContainerStyleSelector) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemContainerStyleSelectorChanged(*(void**)(&oldItemContainerStyleSelector), *(void**)(&newItemContainerStyleSelector)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemContainerStyleSelectorChanged(*(void**)(&oldItemContainerStyleSelector), *(void**)(&newItemContainerStyleSelector)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnItemTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldItemTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newItemTemplate) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemTemplateChanged(*(void**)(&oldItemTemplate), *(void**)(&newItemTemplate)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemTemplateChanged(*(void**)(&oldItemTemplate), *(void**)(&newItemTemplate)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnItemTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldItemTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newItemTemplateSelector) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemTemplateSelectorChanged(*(void**)(&oldItemTemplateSelector), *(void**)(&newItemTemplateSelector)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemTemplateSelectorChanged(*(void**)(&oldItemTemplateSelector), *(void**)(&newItemTemplateSelector)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlOverrides<D>::OnGroupStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& oldGroupStyleSelector, winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& newGroupStyleSelector) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnGroupStyleSelectorChanged(*(void**)(&oldGroupStyleSelector), *(void**)(&newGroupStyleSelector)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>**)this;
            check_hresult(_winrt_abi_type->OnGroupStyleSelectorChanged(*(void**)(&oldGroupStyleSelector), *(void**)(&newGroupStyleSelector)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemsPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::DisplayMemberPathProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMemberPathProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMemberPathProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemContainerStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemContainerStyleSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemContainerTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::GroupStyleSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupStyleSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupStyleSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::IsGroupingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::GetItemsOwner(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetItemsOwner(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->GetItemsOwner(*(void**)(&element), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsControl{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsControlStatics<D>::ItemsControlFromItemContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ItemsControlFromItemContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>**)this;
            check_hresult(_winrt_abi_type->ItemsControlFromItemContainer(*(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsControl{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPickedEventArgs<D>::AddedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPickedEventArgs<D>::RemovedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::HeaderTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::HeaderTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Footer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Footer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Footer(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Footer(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Footer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Footer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::FooterTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FooterTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::FooterTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FooterTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FooterTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::FooterTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FooterTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::FooterTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FooterTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FooterTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenter<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::HeaderTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::FooterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::FooterTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::FooterTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsPresenterStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ItemsSourceView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsSourceView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ItemTemplate(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::Layout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Layout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_Layout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Layout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::Layout(winrt::Microsoft::UI::Xaml::Controls::Layout const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Layout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_Layout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::HorizontalCacheLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalCacheLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalCacheLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::HorizontalCacheLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalCacheLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalCacheLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::VerticalCacheLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalCacheLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_VerticalCacheLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::VerticalCacheLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalCacheLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_VerticalCacheLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::GetElementIndex(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetElementIndex(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->GetElementIndex(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::TryGetElement(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryGetElement(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->TryGetElement(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::GetOrCreateElement(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetOrCreateElement(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->GetOrCreateElement(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementPrepared(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementPreparedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ElementPrepared(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->add_ElementPrepared(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementPrepared(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementPreparedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ElementPrepared_revoker>(this, ElementPrepared(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementPrepared(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ElementPrepared(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            _winrt_abi_type->remove_ElementPrepared(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementClearing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementClearingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ElementClearing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->add_ElementClearing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementClearing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementClearingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ElementClearing_revoker>(this, ElementClearing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementClearing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ElementClearing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            _winrt_abi_type->remove_ElementClearing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementIndexChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementIndexChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ElementIndexChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            check_hresult(_winrt_abi_type->add_ElementIndexChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementIndexChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementIndexChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ElementIndexChanged_revoker>(this, ElementIndexChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater<D>::ElementIndexChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ElementIndexChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>**)this;
            _winrt_abi_type->remove_ElementIndexChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater2<D>::ItemTransitionProvider() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTransitionProvider(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTransitionProvider(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeater2<D>::ItemTransitionProvider(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTransitionProvider(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>**)this;
            check_hresult(_winrt_abi_type->put_ItemTransitionProvider(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementClearingEventArgs<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementIndexChangedEventArgs<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementIndexChangedEventArgs<D>::OldIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementIndexChangedEventArgs<D>::NewIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementPreparedEventArgs<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterElementPreparedEventArgs<D>::Index() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Index(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Index(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::ScrollViewer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollViewer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->get_ScrollViewer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollViewer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::ScrollViewer(winrt::Microsoft::UI::Xaml::Controls::ScrollViewer const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ScrollViewer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->put_ScrollViewer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::CurrentAnchor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::HorizontalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::HorizontalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::VerticalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterScrollHost<D>::VerticalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::LayoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_LayoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::HorizontalCacheLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalCacheLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalCacheLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::VerticalCacheLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalCacheLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalCacheLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsRepeaterStatics2<D>::ItemTransitionProviderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTransitionProviderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTransitionProviderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::Count() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Count(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->get_Count(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::GetAt(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAt(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->GetAt(index, &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::HasKeyIndexMapping() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasKeyIndexMapping(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->get_HasKeyIndexMapping(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::KeyFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->KeyFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->KeyFromIndex(index, &result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::IndexFromKey(param::hstring const& key) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexFromKey(*(void**)(&key), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->IndexFromKey(*(void**)(&key), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceView<D>::IndexOf(winrt::Windows::Foundation::IInspectable const& item) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexOf(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>**)this;
            check_hresult(_winrt_abi_type->IndexOf(*(void**)(&item), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsSourceViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& source, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&source), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&source), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsSourceView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::GroupPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_GroupPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::GroupPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_GroupPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::FirstCacheIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstCacheIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_FirstCacheIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::FirstVisibleIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstVisibleIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_FirstVisibleIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::LastVisibleIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastVisibleIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_LastVisibleIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::LastCacheIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastCacheIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_LastCacheIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::ScrollingDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PanelScrollingDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollingDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_ScrollingDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::GroupHeaderPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::GroupHeaderPlacement(winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupHeaderPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_GroupHeaderPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::ItemsUpdatingScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ItemsUpdatingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsUpdatingScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_ItemsUpdatingScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::ItemsUpdatingScrollMode(winrt::Microsoft::UI::Xaml::Controls::ItemsUpdatingScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsUpdatingScrollMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_ItemsUpdatingScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::CacheLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_CacheLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::CacheLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CacheLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_CacheLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::AreStickyGroupHeadersEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanel<D>::AreStickyGroupHeadersEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreStickyGroupHeadersEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_AreStickyGroupHeadersEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanelStatics<D>::GroupPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanelStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanelStatics<D>::GroupHeaderPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanelStatics<D>::CacheLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_CacheLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsStackPanelStatics<D>::AreStickyGroupHeadersEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ScrollView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_ScrollView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::VerticalScrollController() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollController(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollController(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::VerticalScrollController(winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollController(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollController(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::IElementFactory{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemTemplate(winrt::Microsoft::UI::Xaml::IElementFactory const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::Layout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Layout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_Layout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Layout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::Layout(winrt::Microsoft::UI::Xaml::Controls::Layout const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Layout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_Layout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::IsItemInvokedEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemInvokedEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_IsItemInvokedEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::IsItemInvokedEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsItemInvokedEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_IsItemInvokedEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemTransitionProvider() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTransitionProvider(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_ItemTransitionProvider(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemTransitionProvider(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTransitionProvider(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->put_ItemTransitionProvider(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::CurrentItemIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentItemIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_CurrentItemIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::TryGetItemIndex(double horizontalViewportRatio, double verticalViewportRatio, int32_t& index) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryGetItemIndex(horizontalViewportRatio, verticalViewportRatio, &index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->TryGetItemIndex(horizontalViewportRatio, verticalViewportRatio, &index, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::StartBringItemIntoView(int32_t index, winrt::Microsoft::UI::Xaml::BringIntoViewOptions const& options) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->StartBringItemIntoView(index, *(void**)(&options)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->StartBringItemIntoView(index, *(void**)(&options)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::Select(int32_t itemIndex) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Select(itemIndex));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->Select(itemIndex));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::Deselect(int32_t itemIndex) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Deselect(itemIndex));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->Deselect(itemIndex));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::IsSelected(int32_t itemIndex) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsSelected(itemIndex, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->IsSelected(itemIndex, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::DeselectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DeselectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->DeselectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::InvertSelection() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InvertSelection());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->InvertSelection());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewItemInvokedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewItemInvokedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemInvoked_revoker>(this, ItemInvoked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::ItemInvoked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsView<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsView>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewItemInvokedEventArgs<D>::InvokedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::IsItemInvokedEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemInvokedEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsItemInvokedEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::LayoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_LayoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::ItemTransitionProviderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTransitionProviderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTransitionProviderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::CurrentItemIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentItemIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CurrentItemIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::ScrollViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ScrollViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsViewStatics<D>::VerticalScrollControllerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollControllerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollControllerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::GroupPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_GroupPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::GroupPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_GroupPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::MaximumRowsOrColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::MaximumRowsOrColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::ItemWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::ItemWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::ItemHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::ItemHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::FirstCacheIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstCacheIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_FirstCacheIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::FirstVisibleIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FirstVisibleIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_FirstVisibleIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::LastVisibleIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastVisibleIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_LastVisibleIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::LastCacheIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LastCacheIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_LastCacheIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::ScrollingDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PanelScrollingDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollingDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ScrollingDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::GroupHeaderPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::GroupHeaderPlacement(winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupHeaderPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_GroupHeaderPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::CacheLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_CacheLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::CacheLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CacheLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_CacheLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::AreStickyGroupHeadersEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGrid<D>::AreStickyGroupHeadersEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreStickyGroupHeadersEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_AreStickyGroupHeadersEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemsWrapGrid{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::GroupPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::MaximumRowsOrColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::ItemWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::ItemHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::GroupHeaderPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupHeaderPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::CacheLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CacheLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_CacheLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IItemsWrapGridStatics<D>::AreStickyGroupHeadersEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreStickyGroupHeadersEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IKeyIndexMapping<D>::KeyFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->KeyFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>**)this;
            check_hresult(_winrt_abi_type->KeyFromIndex(index, &result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IKeyIndexMapping<D>::IndexFromKey(param::hstring const& key) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IndexFromKey(*(void**)(&key), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>**)this;
            check_hresult(_winrt_abi_type->IndexFromKey(*(void**)(&key), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::InitializeForContext(winrt::Microsoft::UI::Xaml::Controls::LayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InitializeForContext(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->InitializeForContext(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::UninitializeForContext(winrt::Microsoft::UI::Xaml::Controls::LayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->UninitializeForContext(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->UninitializeForContext(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::Measure(winrt::Microsoft::UI::Xaml::Controls::LayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Measure(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->Measure(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::Arrange(winrt::Microsoft::UI::Xaml::Controls::LayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Arrange(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->Arrange(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::MeasureInvalidated(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_MeasureInvalidated(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->add_MeasureInvalidated(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::MeasureInvalidated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, MeasureInvalidated_revoker>(this, MeasureInvalidated(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::MeasureInvalidated(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_MeasureInvalidated(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            _winrt_abi_type->remove_MeasureInvalidated(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::ArrangeInvalidated(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ArrangeInvalidated(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            check_hresult(_winrt_abi_type->add_ArrangeInvalidated(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::ArrangeInvalidated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ArrangeInvalidated_revoker>(this, ArrangeInvalidated(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout<D>::ArrangeInvalidated(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ArrangeInvalidated(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout>**)this;
            _winrt_abi_type->remove_ArrangeInvalidated(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayout2<D>::IndexBasedLayoutOrientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayout2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayout2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IndexBasedLayoutOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayout2>**)this;
            check_hresult(_winrt_abi_type->get_IndexBasedLayoutOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutContext<D>::LayoutState() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutState(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_LayoutState(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutContext<D>::LayoutState(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LayoutState(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>**)this;
            check_hresult(_winrt_abi_type->put_LayoutState(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutContextOverrides<D>::LayoutStateCore() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutStateCore(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->get_LayoutStateCore(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutContextOverrides<D>::LayoutStateCore(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LayoutStateCore(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->put_LayoutStateCore(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutOverrides<D>::CreateDefaultItemTransitionProvider() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateDefaultItemTransitionProvider(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->CreateDefaultItemTransitionProvider(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutProtected<D>::InvalidateMeasure() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InvalidateMeasure());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>**)this;
            check_hresult(_winrt_abi_type->InvalidateMeasure());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutProtected<D>::InvalidateArrange() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InvalidateArrange());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>**)this;
            check_hresult(_winrt_abi_type->InvalidateArrange());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILayoutProtected2<D>::SetIndexBasedLayoutOrientation(winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation const& orientation) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIndexBasedLayoutOrientation(static_cast<int32_t>(orientation)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>**)this;
            check_hresult(_winrt_abi_type->SetIndexBasedLayoutOrientation(static_cast<int32_t>(orientation)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsInfoRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsInfoRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemsInfoRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->add_ItemsInfoRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsInfoRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsInfoRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemsInfoRequested_revoker>(this, ItemsInfoRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsInfoRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemsInfoRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            _winrt_abi_type->remove_ItemsInfoRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsUnlocked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemsUnlocked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->add_ItemsUnlocked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsUnlocked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ItemsUnlocked_revoker>(this, ItemsUnlocked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsUnlocked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemsUnlocked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            _winrt_abi_type->remove_ItemsUnlocked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsJustification() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsJustification(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_ItemsJustification(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsJustification(winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsJustification(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->put_ItemsJustification(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsStretch() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_ItemsStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ItemsStretch(winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->put_ItemsStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::MinItemSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_MinItemSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::MinItemSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinItemSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->put_MinItemSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::LineSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::LineSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->put_LineSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::LineHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::LineHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::ActualLineHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualLineHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_ActualLineHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::RequestedRangeStartIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequestedRangeStartIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_RequestedRangeStartIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::RequestedRangeLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequestedRangeLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->get_RequestedRangeLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::InvalidateItemsInfo() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InvalidateItemsInfo());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->InvalidateItemsInfo());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayout<D>::LockItemToLine(int32_t itemIndex) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LockItemToLine(itemIndex, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>**)this;
            check_hresult(_winrt_abi_type->LockItemToLine(itemIndex, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemCollectionTransitionProviderFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemCollectionTransitionProvider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::ItemsRangeStartIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsRangeStartIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemsRangeStartIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::ItemsRangeStartIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsRangeStartIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_ItemsRangeStartIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::ItemsRangeRequestedLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsRangeRequestedLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemsRangeRequestedLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::MinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_MinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::MinWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_MinWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::MaxWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_MaxWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::MaxWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_MaxWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::SetDesiredAspectRatios(array_view<double const> values) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDesiredAspectRatios(values.size(), get_abi(values)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->SetDesiredAspectRatios(values.size(), get_abi(values)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::SetMinWidths(array_view<double const> values) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetMinWidths(values.size(), get_abi(values)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->SetMinWidths(values.size(), get_abi(values)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutItemsInfoRequestedEventArgs<D>::SetMaxWidths(array_view<double const> values) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetMaxWidths(values.size(), get_abi(values)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->SetMaxWidths(values.size(), get_abi(values)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::ItemsJustificationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsJustificationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsJustificationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::ItemsStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::MinItemSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinItemSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::LineSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::LineHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ILinedFlowLayoutStatics<D>::ActualLineHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualLineHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActualLineHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SelectedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::SelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SingleSelectionFollowsFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SingleSelectionFollowsFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SingleSelectionFollowsFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->put_SingleSelectionFollowsFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::ScrollIntoView(winrt::Windows::Foundation::IInspectable const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollIntoView(*(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->ScrollIntoView(*(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBox<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBox>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBoxItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListBoxItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBoxStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListBoxStatics<D>::SingleSelectionFollowsFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::DisplayMemberPath() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMemberPath(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMemberPath(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::DisplayMemberPath(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayMemberPath(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_DisplayMemberPath(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyoutSelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyoutSelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedValue() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectedValue(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedValue(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedValue(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_SelectedValue(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedValuePath() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValuePath(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectedValuePath(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedValuePath(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedValuePath(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_SelectedValuePath(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::SelectedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemsPicked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyout, winrt::Microsoft::UI::Xaml::Controls::ItemsPickedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemsPicked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->add_ItemsPicked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemsPicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyout, winrt::Microsoft::UI::Xaml::Controls::ItemsPickedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemsPicked_revoker>(this, ItemsPicked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ItemsPicked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemsPicked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            _winrt_abi_type->remove_ItemsPicked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyout<D>::ShowAtAsync(winrt::Microsoft::UI::Xaml::FrameworkElement const& target) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::DisplayMemberPathProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMemberPathProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMemberPathProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::SelectedValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListPickerFlyoutStatics<D>::SelectedValuePathProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValuePathProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedValuePathProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ListViewSelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::ListViewSelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsSwipeEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSwipeEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_IsSwipeEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsSwipeEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSwipeEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_IsSwipeEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::CanDragItems() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_CanDragItems(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::CanDragItems(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanDragItems(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_CanDragItems(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::CanReorderItems() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderItems(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::CanReorderItems(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanReorderItems(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_CanReorderItems(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsItemClickEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemClickEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_IsItemClickEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsItemClickEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsItemClickEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_IsItemClickEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DataFetchSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DataFetchSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_DataFetchSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DataFetchSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DataFetchSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_DataFetchSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IncrementalLoadingThreshold() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingThreshold(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingThreshold(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IncrementalLoadingThreshold(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IncrementalLoadingThreshold(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_IncrementalLoadingThreshold(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IncrementalLoadingTrigger() const
    {
        winrt::Microsoft::UI::Xaml::Controls::IncrementalLoadingTrigger value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingTrigger(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingTrigger(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IncrementalLoadingTrigger(winrt::Microsoft::UI::Xaml::Controls::IncrementalLoadingTrigger const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IncrementalLoadingTrigger(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_IncrementalLoadingTrigger(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ShowsScrollingPlaceholders() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowsScrollingPlaceholders(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_ShowsScrollingPlaceholders(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ShowsScrollingPlaceholders(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowsScrollingPlaceholders(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_ShowsScrollingPlaceholders(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ReorderMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ListViewReorderMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_ReorderMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ReorderMode(winrt::Microsoft::UI::Xaml::Controls::ListViewReorderMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ReorderMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_ReorderMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectedRanges() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedRanges(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_SelectedRanges(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::Data::ItemIndexRange>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsMultiSelectCheckBoxEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsMultiSelectCheckBoxEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_IsMultiSelectCheckBoxEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsMultiSelectCheckBoxEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsMultiSelectCheckBoxEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_IsMultiSelectCheckBoxEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SingleSelectionFollowsFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SingleSelectionFollowsFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SingleSelectionFollowsFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_SingleSelectionFollowsFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ItemClick(winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_ItemClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ItemClick(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ItemClick_revoker>(this, ItemClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ItemClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_ItemClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsStarting(winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragItemsStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_DragItemsStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsStarting(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, DragItemsStarting_revoker>(this, DragItemsStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragItemsStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_DragItemsStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragItemsCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_DragItemsCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DragItemsCompleted_revoker>(this, DragItemsCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DragItemsCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragItemsCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_DragItemsCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ContainerContentChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContainerContentChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_ContainerContentChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ContainerContentChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ContainerContentChanging_revoker>(this, ContainerContentChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ContainerContentChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContainerContentChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_ContainerContentChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingItemContainer(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingItemContainerEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ChoosingItemContainer(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_ChoosingItemContainer(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingItemContainer(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingItemContainerEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ChoosingItemContainer_revoker>(this, ChoosingItemContainer(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingItemContainer(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ChoosingItemContainer(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_ChoosingItemContainer(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingGroupHeaderContainer(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingGroupHeaderContainerEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ChoosingGroupHeaderContainer(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->add_ChoosingGroupHeaderContainer(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingGroupHeaderContainer(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingGroupHeaderContainerEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ChoosingGroupHeaderContainer_revoker>(this, ChoosingGroupHeaderContainer(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ChoosingGroupHeaderContainer(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ChoosingGroupHeaderContainer(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            _winrt_abi_type->remove_ChoosingGroupHeaderContainer(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ScrollIntoView(winrt::Windows::Foundation::IInspectable const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollIntoView(*(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->ScrollIntoView(*(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::LoadMoreItemsAsync() const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LoadMoreItemsAsync(&operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->LoadMoreItemsAsync(&operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Data::LoadMoreItemsResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::ScrollIntoView(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::Controls::ScrollIntoViewAlignment const& alignment) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollIntoViewWithAlignment(*(void**)(&item), static_cast<int32_t>(alignment)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->ScrollIntoViewWithAlignment(*(void**)(&item), static_cast<int32_t>(alignment)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SetDesiredContainerUpdateDuration(winrt::Windows::Foundation::TimeSpan const& duration) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDesiredContainerUpdateDuration(impl::bind_in(duration)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->SetDesiredContainerUpdateDuration(impl::bind_in(duration)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::SelectRange(winrt::Microsoft::UI::Xaml::Data::ItemIndexRange const& itemIndexRange) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectRange(*(void**)(&itemIndexRange)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->SelectRange(*(void**)(&itemIndexRange)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::DeselectRange(winrt::Microsoft::UI::Xaml::Data::ItemIndexRange const& itemIndexRange) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->DeselectRange(*(void**)(&itemIndexRange)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->DeselectRange(*(void**)(&itemIndexRange)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::IsDragSource() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->IsDragSource(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->IsDragSource(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::TryStartConnectedAnimationAsync(winrt::Microsoft::UI::Xaml::Media::Animation::ConnectedAnimation const& animation, winrt::Windows::Foundation::IInspectable const& item, param::hstring const& elementName) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryStartConnectedAnimationAsync(*(void**)(&animation), *(void**)(&item), *(void**)(&elementName), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->TryStartConnectedAnimationAsync(*(void**)(&animation), *(void**)(&item), *(void**)(&elementName), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<bool>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::PrepareConnectedAnimation(param::hstring const& key, winrt::Windows::Foundation::IInspectable const& item, param::hstring const& elementName) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PrepareConnectedAnimation(*(void**)(&key), *(void**)(&item), *(void**)(&elementName), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->PrepareConnectedAnimation(*(void**)(&key), *(void**)(&item), *(void**)(&elementName), &result));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::ConnectedAnimation{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::HeaderTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::HeaderTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::Footer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Footer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_Footer(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::Footer(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Footer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_Footer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::FooterTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_FooterTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::FooterTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FooterTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_FooterTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::FooterTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->get_FooterTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBase<D>::FooterTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FooterTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBase>**)this;
            check_hresult(_winrt_abi_type->put_FooterTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListViewBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IsSwipeEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSwipeEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSwipeEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::CanDragItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanDragItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::CanReorderItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IsItemClickEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemClickEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsItemClickEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::DataFetchSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DataFetchSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_DataFetchSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IncrementalLoadingThresholdProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingThresholdProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingThresholdProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IncrementalLoadingTriggerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingTriggerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IncrementalLoadingTriggerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::ShowsScrollingPlaceholdersProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowsScrollingPlaceholdersProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowsScrollingPlaceholdersProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::ReorderModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReorderModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IsMultiSelectCheckBoxEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsMultiSelectCheckBoxEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsMultiSelectCheckBoxEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::SingleSelectionFollowsFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::SemanticZoomOwnerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwnerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwnerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IsActiveViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsActiveViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsActiveViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::IsZoomedInViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::HeaderTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::FooterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::FooterTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewBaseStatics<D>::FooterTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewHeaderItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListViewHeaderItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewItem<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewItem>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ListViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewPersistenceHelperStatics<D>::GetRelativeScrollPosition(winrt::Microsoft::UI::Xaml::Controls::ListViewBase const& listViewBase, winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler const& itemToKeyHandler) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRelativeScrollPosition(*(void**)(&listViewBase), *(void**)(&itemToKeyHandler), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>**)this;
            check_hresult(_winrt_abi_type->GetRelativeScrollPosition(*(void**)(&listViewBase), *(void**)(&itemToKeyHandler), &result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IListViewPersistenceHelperStatics<D>::SetRelativeScrollPositionAsync(winrt::Microsoft::UI::Xaml::Controls::ListViewBase const& listViewBase, param::hstring const& relativeScrollPosition, winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler const& keyToItemHandler) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetRelativeScrollPositionAsync(*(void**)(&listViewBase), *(void**)(&relativeScrollPosition), *(void**)(&keyToItemHandler), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>**)this;
            check_hresult(_winrt_abi_type->SetRelativeScrollPositionAsync(*(void**)(&listViewBase), *(void**)(&relativeScrollPosition), *(void**)(&keyToItemHandler), &operation));
        }
        return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapServiceToken() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MapServiceToken(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->get_MapServiceToken(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapServiceToken(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MapServiceToken(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->put_MapServiceToken(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::Center() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Center(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->get_Center(&value));
        }
        return winrt::Windows::Devices::Geolocation::Geopoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::Center(winrt::Windows::Devices::Geolocation::Geopoint const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Center(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->put_Center(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::Layers() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Layers(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->get_Layers(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapLayer>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::Layers(param::vector<winrt::Microsoft::UI::Xaml::Controls::MapLayer> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Layers(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->put_Layers(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::ZoomLevel() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomLevel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->get_ZoomLevel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::ZoomLevel(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomLevel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->put_ZoomLevel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::InteractiveControlsVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InteractiveControlsVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->get_InteractiveControlsVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::InteractiveControlsVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InteractiveControlsVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->put_InteractiveControlsVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapElementClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_MapElementClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->add_MapElementClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapElementClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, MapElementClick_revoker>(this, MapElementClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapElementClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_MapElementClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            _winrt_abi_type->remove_MapElementClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapServiceErrorOccurred(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapControlMapServiceErrorOccurredEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_MapServiceErrorOccurred(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            check_hresult(_winrt_abi_type->add_MapServiceErrorOccurred(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapServiceErrorOccurred(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapControlMapServiceErrorOccurredEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, MapServiceErrorOccurred_revoker>(this, MapServiceErrorOccurred(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControl<D>::MapServiceErrorOccurred(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_MapServiceErrorOccurred(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControl>**)this;
            _winrt_abi_type->remove_MapServiceErrorOccurred(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MapControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlMapServiceErrorOccurredEventArgs<D>::DiagnosticMessage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DiagnosticMessage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DiagnosticMessage(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlStatics<D>::LayersProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayersProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_LayersProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlStatics<D>::MapServiceTokenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MapServiceTokenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_MapServiceTokenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlStatics<D>::CenterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CenterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_CenterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlStatics<D>::ZoomLevelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomLevelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomLevelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapControlStatics<D>::InteractiveControlsVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InteractiveControlsVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_InteractiveControlsVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementClickEventArgs<D>::Location() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Location(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Location(&value));
        }
        return winrt::Windows::Devices::Geolocation::Geopoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementClickEventArgs<D>::Element() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Element(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MapElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayer<D>::MapElements() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MapElements(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)this;
            check_hresult(_winrt_abi_type->get_MapElements(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayer<D>::MapElements(param::vector<winrt::Microsoft::UI::Xaml::Controls::MapElement> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MapElements(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)this;
            check_hresult(_winrt_abi_type->put_MapElements(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayer<D>::MapElementClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_MapElementClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)this;
            check_hresult(_winrt_abi_type->add_MapElementClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayer<D>::MapElementClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, MapElementClick_revoker>(this, MapElementClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayer<D>::MapElementClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_MapElementClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>**)this;
            _winrt_abi_type->remove_MapElementClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapElementsLayerStatics<D>::MapElementsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MapElementsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MapElementsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapIcon<D>::Location() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Location(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIcon>**)this;
            check_hresult(_winrt_abi_type->get_Location(&value));
        }
        return winrt::Windows::Devices::Geolocation::Geopoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapIcon<D>::Location(winrt::Windows::Devices::Geolocation::Geopoint const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Location(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIcon>**)this;
            check_hresult(_winrt_abi_type->put_Location(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MapIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMapIconStatics<D>::LocationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LocationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_LocationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Windows::Media::Playback::IMediaPlaybackSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::Source(winrt::Windows::Media::Playback::IMediaPlaybackSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::TransportControls() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TransportControls(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_TransportControls(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::TransportControls(winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TransportControls(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_TransportControls(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::AreTransportControlsEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreTransportControlsEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_AreTransportControlsEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::AreTransportControlsEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreTransportControlsEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_AreTransportControlsEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::PosterSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PosterSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_PosterSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::PosterSource(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PosterSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_PosterSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::Stretch() const
    {
        winrt::Microsoft::UI::Xaml::Media::Stretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::Stretch(winrt::Microsoft::UI::Xaml::Media::Stretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::AutoPlay() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoPlay(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_AutoPlay(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::AutoPlay(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AutoPlay(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_AutoPlay(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::IsFullWindow() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFullWindow(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_IsFullWindow(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::IsFullWindow(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFullWindow(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->put_IsFullWindow(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::MediaPlayer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MediaPlayer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->get_MediaPlayer(&value));
        }
        return winrt::Windows::Media::Playback::MediaPlayer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElement<D>::SetMediaPlayer(winrt::Windows::Media::Playback::MediaPlayer const& mediaPlayer) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetMediaPlayer(*(void**)(&mediaPlayer)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>**)this;
            check_hresult(_winrt_abi_type->SetMediaPlayer(*(void**)(&mediaPlayer)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MediaPlayerElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::AreTransportControlsEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreTransportControlsEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreTransportControlsEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::PosterSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PosterSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_PosterSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::StretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::AutoPlayProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoPlayProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_AutoPlayProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::IsFullWindowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFullWindowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFullWindowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerElementStatics<D>::MediaPlayerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MediaPlayerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>**)this;
            check_hresult(_winrt_abi_type->get_MediaPlayerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::MediaPlayer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MediaPlayer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->get_MediaPlayer(&value));
        }
        return winrt::Windows::Media::Playback::MediaPlayer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::MediaPlayer(winrt::Windows::Media::Playback::MediaPlayer const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MediaPlayer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->put_MediaPlayer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::Stretch() const
    {
        winrt::Microsoft::UI::Xaml::Media::Stretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::Stretch(winrt::Microsoft::UI::Xaml::Media::Stretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::IsFullWindow() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFullWindow(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsFullWindow(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenter<D>::IsFullWindow(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFullWindow(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsFullWindow(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MediaPlayerPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenterStatics<D>::MediaPlayerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MediaPlayerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_MediaPlayerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenterStatics<D>::StretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaPlayerPresenterStatics<D>::IsFullWindowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFullWindowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFullWindowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsZoomButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsZoomButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsZoomEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsZoomEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastForwardButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastForwardButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsFastForwardButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastForwardButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFastForwardButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsFastForwardButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastForwardEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastForwardEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsFastForwardEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastForwardEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFastForwardEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsFastForwardEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastRewindButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastRewindButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsFastRewindButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastRewindButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFastRewindButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsFastRewindButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastRewindEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastRewindEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsFastRewindEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsFastRewindEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsFastRewindEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsFastRewindEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsStopButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsStopButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsStopButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsStopButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsStopButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsStopButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsStopEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsStopEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsStopEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsStopEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsStopEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsStopEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsVolumeButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVolumeButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsVolumeButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsVolumeButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsVolumeButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsVolumeButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsVolumeEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVolumeEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsVolumeEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsVolumeEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsVolumeEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsVolumeEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPlaybackRateButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPlaybackRateButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPlaybackRateButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsPlaybackRateButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPlaybackRateEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPlaybackRateEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPlaybackRateEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsPlaybackRateEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSeekBarVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSeekBarVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSeekBarVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSeekBarVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSeekBarVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSeekBarVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSeekEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSeekEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSeekEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSeekEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSeekEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSeekEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsCompact() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompact(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsCompact(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsCompact(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsCompact(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsCompact(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipForwardButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipForwardButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipForwardButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipForwardButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSkipForwardButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSkipForwardButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipForwardEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipForwardEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipForwardEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipForwardEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSkipForwardEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSkipForwardEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipBackwardButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipBackwardButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSkipBackwardButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSkipBackwardButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipBackwardEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsSkipBackwardEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSkipBackwardEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsSkipBackwardEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsNextTrackButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsNextTrackButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsNextTrackButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsNextTrackButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsNextTrackButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsNextTrackButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPreviousTrackButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPreviousTrackButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsPreviousTrackButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsPreviousTrackButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPreviousTrackButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsPreviousTrackButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::FastPlayFallbackBehaviour() const
    {
        winrt::Microsoft::UI::Xaml::Media::FastPlayFallbackBehaviour value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FastPlayFallbackBehaviour(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_FastPlayFallbackBehaviour(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::FastPlayFallbackBehaviour(winrt::Microsoft::UI::Xaml::Media::FastPlayFallbackBehaviour const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FastPlayFallbackBehaviour(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_FastPlayFallbackBehaviour(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::ShowAndHideAutomatically() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAndHideAutomatically(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_ShowAndHideAutomatically(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::ShowAndHideAutomatically(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowAndHideAutomatically(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_ShowAndHideAutomatically(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsRepeatEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsRepeatEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsRepeatEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsRepeatEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsRepeatEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsRepeatEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsRepeatButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsRepeatButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->get_IsRepeatButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::IsRepeatButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsRepeatButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->put_IsRepeatButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::ThumbnailRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls, winrt::Microsoft::UI::Xaml::Media::MediaTransportControlsThumbnailRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ThumbnailRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->add_ThumbnailRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::ThumbnailRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls, winrt::Microsoft::UI::Xaml::Media::MediaTransportControlsThumbnailRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ThumbnailRequested_revoker>(this, ThumbnailRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::ThumbnailRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ThumbnailRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            _winrt_abi_type->remove_ThumbnailRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::Show() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Show());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->Show());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControls<D>::Hide() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Hide());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>**)this;
            check_hresult(_winrt_abi_type->Hide());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsHelperStatics<D>::DropoutOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropoutOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)this;
            check_hresult(_winrt_abi_type->get_DropoutOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsHelperStatics<D>::GetDropoutOrder(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetDropoutOrder(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)this;
            check_hresult(_winrt_abi_type->GetDropoutOrder(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IReference<int32_t>{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsHelperStatics<D>::SetDropoutOrder(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IReference<int32_t> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetDropoutOrder(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>**)this;
            check_hresult(_winrt_abi_type->SetDropoutOrder(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsZoomButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsZoomEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsFastForwardButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastForwardButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFastForwardButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsFastForwardEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastForwardEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFastForwardEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsFastRewindButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastRewindButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFastRewindButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsFastRewindEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsFastRewindEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsFastRewindEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsStopButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsStopButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsStopButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsStopEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsStopEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsStopEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsVolumeButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVolumeButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVolumeButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsVolumeEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVolumeEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVolumeEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsPlaybackRateButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsPlaybackRateEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPlaybackRateEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSeekBarVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSeekBarVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSeekBarVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSeekEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSeekEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSeekEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsCompactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCompactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSkipForwardButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipForwardButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipForwardButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSkipForwardEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipForwardEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipForwardEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSkipBackwardButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsSkipBackwardEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSkipBackwardEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsNextTrackButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsNextTrackButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsNextTrackButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsPreviousTrackButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPreviousTrackButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPreviousTrackButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::FastPlayFallbackBehaviourProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FastPlayFallbackBehaviourProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_FastPlayFallbackBehaviourProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::ShowAndHideAutomaticallyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowAndHideAutomaticallyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowAndHideAutomaticallyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsRepeatEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsRepeatEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsRepeatEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMediaTransportControlsStatics<D>::IsRepeatButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsRepeatButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsRepeatButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBar<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBar>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItem<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItem<D>::Title(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItem<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuBarItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItemFlyoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuBarItemFlyout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItemStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarItemStatics<D>::ItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuBarStatics<D>::ItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyout<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyout<D>::MenuFlyoutPresenterStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuFlyoutPresenterStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MenuFlyoutPresenterStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyout<D>::MenuFlyoutPresenterStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuFlyoutPresenterStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MenuFlyoutPresenterStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyout<D>::ShowAt(winrt::Microsoft::UI::Xaml::UIElement const& targetElement, winrt::Windows::Foundation::Point const& point) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAt(*(void**)(&targetElement), impl::bind_in(point)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>**)this;
            check_hresult(_winrt_abi_type->ShowAt(*(void**)(&targetElement), impl::bind_in(point)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuFlyout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Command() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Command(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::CommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::CommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::KeyboardAcceleratorTextOverride() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverride(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::KeyboardAcceleratorTextOverride(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_KeyboardAcceleratorTextOverride(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Click(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Click(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->add_Click(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Click(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Click_revoker>(this, Click(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItem<D>::Click(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Click(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>**)this;
            _winrt_abi_type->remove_Click(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemStatics<D>::CommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemStatics<D>::CommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutItemStatics<D>::KeyboardAcceleratorTextOverrideProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextOverrideProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenter<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutPresenterTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenter<D>::IsDefaultShadowEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenter<D>::IsDefaultShadowEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenter2<D>::SystemBackdrop() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdrop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>**)this;
            check_hresult(_winrt_abi_type->get_SystemBackdrop(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SystemBackdrop{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenter2<D>::SystemBackdrop(winrt::Microsoft::UI::Xaml::Media::SystemBackdrop const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SystemBackdrop(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>**)this;
            check_hresult(_winrt_abi_type->put_SystemBackdrop(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenterStatics<D>::IsDefaultShadowEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutPresenterStatics2<D>::SystemBackdropProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdropProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2>**)this;
            check_hresult(_winrt_abi_type->get_SystemBackdropProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSeparatorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSeparator{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutStatics<D>::MenuFlyoutPresenterStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuFlyoutPresenterStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuFlyoutPresenterStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItem<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItem<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItem<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItem<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItem<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItemStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IMenuFlyoutSubItemStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigate<D>::Navigate(winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigate>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigate, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigate>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Navigate(impl::bind_in(sourcePageType), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigate>**)this;
            check_hresult(_winrt_abi_type->Navigate(impl::bind_in(sourcePageType), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsPaneOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsPaneOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPaneOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_IsPaneOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::CompactModeThresholdWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactModeThresholdWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_CompactModeThresholdWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::CompactModeThresholdWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CompactModeThresholdWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_CompactModeThresholdWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ExpandedModeThresholdWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedModeThresholdWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedModeThresholdWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ExpandedModeThresholdWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ExpandedModeThresholdWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_ExpandedModeThresholdWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::FooterMenuItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterMenuItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_FooterMenuItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::FooterMenuItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::FooterMenuItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FooterMenuItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_FooterMenuItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::PaneFooter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneFooter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_PaneFooter(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::PaneFooter(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneFooter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_PaneFooter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::DisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsSettingsVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSettingsVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_IsSettingsVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsSettingsVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSettingsVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_IsSettingsVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsPaneToggleButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneToggleButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneToggleButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsPaneToggleButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPaneToggleButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_IsPaneToggleButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::AlwaysShowHeader() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlwaysShowHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_AlwaysShowHeader(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::AlwaysShowHeader(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AlwaysShowHeader(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_AlwaysShowHeader(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::CompactPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::CompactPaneLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CompactPaneLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_CompactPaneLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::OpenPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::OpenPaneLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpenPaneLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_OpenPaneLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::PaneToggleButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::PaneToggleButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneToggleButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_PaneToggleButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SettingsItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SettingsItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_SettingsItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::AutoSuggestBox() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoSuggestBox(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_AutoSuggestBox(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::AutoSuggestBox(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AutoSuggestBox(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_AutoSuggestBox(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemContainerStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemContainerStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemContainerStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemContainerStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemContainerStyleSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemContainerStyleSelector(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemContainerStyleSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemContainerStyleSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::MenuItemFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MenuItemFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->MenuItemFromContainer(*(void**)(&container), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ContainerFromMenuItem(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromMenuItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->ContainerFromMenuItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SelectionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SelectionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ItemInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemInvoked_revoker>(this, ItemInvoked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::ItemInvoked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::DisplayModeChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayModeChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DisplayModeChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->add_DisplayModeChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::DisplayModeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayModeChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DisplayModeChanged_revoker>(this, DisplayModeChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::DisplayModeChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DisplayModeChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            _winrt_abi_type->remove_DisplayModeChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsTitleBarAutoPaddingEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTitleBarAutoPaddingEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->get_IsTitleBarAutoPaddingEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView<D>::IsTitleBarAutoPaddingEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTitleBarAutoPaddingEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView>**)this;
            check_hresult(_winrt_abi_type->put_IsTitleBarAutoPaddingEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsBackButtonVisible() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBackButtonVisible(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_IsBackButtonVisible(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsBackButtonVisible(winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsBackButtonVisible(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_IsBackButtonVisible(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsBackEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBackEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_IsBackEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsBackEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsBackEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_IsBackEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneTitle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneTitle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_PaneTitle(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneTitle(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneTitle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_PaneTitle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::BackRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_BackRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_BackRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::BackRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, BackRequested_revoker>(this, BackRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::BackRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_BackRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_BackRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneClosed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_PaneClosed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneClosed_revoker>(this, PaneClosed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneClosed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_PaneClosed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneClosing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_PaneClosing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PaneClosing_revoker>(this, PaneClosing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneClosing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneClosing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_PaneClosing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpened(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneOpened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_PaneOpened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneOpened_revoker>(this, PaneOpened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneOpened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_PaneOpened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpening(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_PaneOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpening(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneOpening_revoker>(this, PaneOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_PaneOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneDisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneDisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_PaneDisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneDisplayMode(winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneDisplayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_PaneDisplayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_PaneHeader(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneHeader(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_PaneHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneCustomContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneCustomContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_PaneCustomContent(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::PaneCustomContent(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneCustomContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_PaneCustomContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::ContentOverlay() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentOverlay(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_ContentOverlay(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::ContentOverlay(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentOverlay(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_ContentOverlay(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsPaneVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::IsPaneVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPaneVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_IsPaneVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::SelectionFollowsFocus() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFollowsFocus(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFollowsFocus(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::SelectionFollowsFocus(winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFollowsFocus(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFollowsFocus(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::ShoulderNavigationEnabled() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShoulderNavigationEnabled(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_ShoulderNavigationEnabled(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::ShoulderNavigationEnabled(winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShoulderNavigationEnabled(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_ShoulderNavigationEnabled(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::OverflowLabelMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowLabelMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->get_OverflowLabelMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::OverflowLabelMode(winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OverflowLabelMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->put_OverflowLabelMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Expanding(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemExpandingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Expanding(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemExpandingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Expanding_revoker>(this, Expanding(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Expanding(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Collapsed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemCollapsedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Collapsed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemCollapsedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Collapsed_revoker>(this, Collapsed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Collapsed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Expand(winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Expand(*(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->Expand(*(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationView2<D>::Collapse(winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Collapse(*(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationView2>**)this;
            check_hresult(_winrt_abi_type->Collapse(*(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewDisplayModeChangedEventArgs<D>::DisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem<D>::CompactPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::SelectsOnInvoked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectsOnInvoked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_SelectsOnInvoked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::SelectsOnInvoked(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectsOnInvoked(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_SelectsOnInvoked(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::IsExpanded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::IsExpanded(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::HasUnrealizedChildren() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::HasUnrealizedChildren(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::IsChildSelected() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChildSelected(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_IsChildSelected(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::IsChildSelected(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsChildSelected(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_IsChildSelected(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::MenuItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_MenuItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::MenuItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem2<D>::MenuItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MenuItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_MenuItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem3<D>::InfoBadge() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadge(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>**)this;
            check_hresult(_winrt_abi_type->get_InfoBadge(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::InfoBadge{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItem3<D>::InfoBadge(winrt::Microsoft::UI::Xaml::Controls::InfoBadge const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InfoBadge(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>**)this;
            check_hresult(_winrt_abi_type->put_InfoBadge(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemBase2<D>::IsSelected() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>**)this;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemBase2<D>::IsSelected(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>**)this;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemBaseStatics<D>::IsSelectedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelectedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSelectedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemCollapsedEventArgs<D>::CollapsedItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemCollapsedEventArgs<D>::CollapsedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemExpandingEventArgs<D>::ExpandingItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandingItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ExpandingItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemExpandingEventArgs<D>::ExpandingItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandingItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ExpandingItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemHeaderFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemHeader{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemInvokedEventArgs<D>::InvokedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemInvokedEventArgs<D>::IsSettingsInvoked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSettingsInvoked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsSettingsInvoked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemInvokedEventArgs2<D>::InvokedItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InvokedItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_InvokedItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemInvokedEventArgs2<D>::RecommendedNavigationTransitionInfo() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RecommendedNavigationTransitionInfo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_RecommendedNavigationTransitionInfo(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemSeparatorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemSeparator{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics<D>::CompactPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::SelectsOnInvokedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectsOnInvokedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_SelectsOnInvokedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::IsExpandedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::HasUnrealizedChildrenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildrenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildrenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::IsChildSelectedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChildSelectedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_IsChildSelectedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::MenuItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics2<D>::MenuItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewItemStatics3<D>::InfoBadgeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadgeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3>**)this;
            check_hresult(_winrt_abi_type->get_InfoBadgeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewPaneClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewPaneClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewSelectionChangedEventArgs<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewSelectionChangedEventArgs<D>::IsSettingsSelected() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSettingsSelected(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsSettingsSelected(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewSelectionChangedEventArgs2<D>::SelectedItemContainer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemContainer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemContainer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewSelectionChangedEventArgs2<D>::RecommendedNavigationTransitionInfo() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RecommendedNavigationTransitionInfo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_RecommendedNavigationTransitionInfo(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::IsPaneOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::CompactModeThresholdWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactModeThresholdWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompactModeThresholdWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::ExpandedModeThresholdWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedModeThresholdWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedModeThresholdWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::FooterMenuItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::FooterMenuItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_FooterMenuItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::PaneFooterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneFooterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneFooterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::DisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::IsSettingsVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSettingsVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSettingsVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::IsPaneToggleButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneToggleButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneToggleButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::AlwaysShowHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlwaysShowHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlwaysShowHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::CompactPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::OpenPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::PaneToggleButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::SettingsItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SettingsItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SettingsItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::AutoSuggestBoxProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AutoSuggestBoxProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_AutoSuggestBoxProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemContainerStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::MenuItemContainerStyleSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MenuItemContainerStyleSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics<D>::IsTitleBarAutoPaddingEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTitleBarAutoPaddingEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTitleBarAutoPaddingEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::IsBackButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBackButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_IsBackButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::IsBackEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsBackEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_IsBackEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::PaneTitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneTitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_PaneTitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::PaneDisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneDisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_PaneDisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::PaneHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_PaneHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::PaneCustomContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneCustomContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_PaneCustomContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::ContentOverlayProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentOverlayProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ContentOverlayProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::IsPaneVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::SelectionFollowsFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFollowsFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFollowsFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::ShoulderNavigationEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShoulderNavigationEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ShoulderNavigationEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewStatics2<D>::OverflowLabelModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowLabelModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_OverflowLabelModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::TopPadding() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopPadding(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_TopPadding(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::OverflowButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::PaneToggleButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::BackButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_BackButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::TopPaneVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopPaneVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_TopPaneVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::LeftPaneVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftPaneVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_LeftPaneVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::SingleSelectionFollowsFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::PaneToggleButtonWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings<D>::SmallerPaneToggleButtonWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallerPaneToggleButtonWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_SmallerPaneToggleButtonWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettings2<D>::OpenPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NavigationViewTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::TopPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::OverflowButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_OverflowButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::PaneToggleButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::BackButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::TopPaneVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopPaneVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopPaneVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::LeftPaneVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftPaneVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftPaneVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::SingleSelectionFollowsFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_SingleSelectionFollowsFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::PaneToggleButtonWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneToggleButtonWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics<D>::SmallerPaneToggleButtonWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallerPaneToggleButtonWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_SmallerPaneToggleButtonWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INavigationViewTemplateSettingsStatics2<D>::OpenPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutContext<D>::Children() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::UIElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutContextFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutContextOverrides<D>::ChildrenCore() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildrenCore(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->get_ChildrenCore(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::UIElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutOverrides<D>::InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InitializeForContextCore(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->InitializeForContextCore(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutOverrides<D>::UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->UninitializeForContextCore(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->UninitializeForContextCore(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutOverrides<D>::MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MeasureOverride(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->MeasureOverride(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INonVirtualizingLayoutOverrides<D>::ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ArrangeOverride(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->ArrangeOverride(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Minimum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Minimum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Maximum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Maximum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Value(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SmallChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SmallChange(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::LargeChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LargeChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_LargeChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::LargeChange(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LargeChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_LargeChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::PreventKeyboardDisplayOnProgrammaticFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::ValidationMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NumberBoxValidationMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValidationMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_ValidationMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::ValidationMode(winrt::Microsoft::UI::Xaml::Controls::NumberBoxValidationMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ValidationMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_ValidationMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SpinButtonPlacementMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::NumberBoxSpinButtonPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SpinButtonPlacementMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_SpinButtonPlacementMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::SpinButtonPlacementMode(winrt::Microsoft::UI::Xaml::Controls::NumberBoxSpinButtonPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SpinButtonPlacementMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_SpinButtonPlacementMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::IsWrapEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsWrapEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_IsWrapEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::IsWrapEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsWrapEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_IsWrapEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::AcceptsExpression() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsExpression(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsExpression(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::AcceptsExpression(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AcceptsExpression(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_AcceptsExpression(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::NumberFormatter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberFormatter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->get_NumberFormatter(&value));
        }
        return winrt::Windows::Globalization::NumberFormatting::INumberFormatter2{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::NumberFormatter(winrt::Windows::Globalization::NumberFormatting::INumberFormatter2 const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NumberFormatter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->put_NumberFormatter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::ValueChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NumberBox, winrt::Microsoft::UI::Xaml::Controls::NumberBoxValueChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::ValueChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NumberBox, winrt::Microsoft::UI::Xaml::Controls::NumberBoxValueChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ValueChanged_revoker>(this, ValueChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBox<D>::ValueChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ValueChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBox>**)this;
            _winrt_abi_type->remove_ValueChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::NumberBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::MinimumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinimumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinimumProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::MaximumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::ValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::SmallChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SmallChangeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::LargeChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LargeChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_LargeChangeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::PreventKeyboardDisplayOnProgrammaticFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::ValidationModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValidationModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_ValidationModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::SpinButtonPlacementModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SpinButtonPlacementModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SpinButtonPlacementModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::IsWrapEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsWrapEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsWrapEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::AcceptsExpressionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsExpressionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsExpressionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxStatics<D>::NumberFormatterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberFormatterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_NumberFormatterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxValueChangedEventArgs<D>::OldValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_INumberBoxValueChangedEventArgs<D>::NewValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::Frame() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Frame(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->get_Frame(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Frame{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::NavigationCacheMode() const
    {
        winrt::Microsoft::UI::Xaml::Navigation::NavigationCacheMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NavigationCacheMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->get_NavigationCacheMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::NavigationCacheMode(winrt::Microsoft::UI::Xaml::Navigation::NavigationCacheMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NavigationCacheMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->put_NavigationCacheMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::TopAppBar() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopAppBar(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->get_TopAppBar(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::TopAppBar(winrt::Microsoft::UI::Xaml::Controls::AppBar const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopAppBar(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->put_TopAppBar(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::BottomAppBar() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BottomAppBar(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->get_BottomAppBar(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::AppBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPage<D>::BottomAppBar(winrt::Microsoft::UI::Xaml::Controls::AppBar const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPage>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPage, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BottomAppBar(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPage>**)this;
            check_hresult(_winrt_abi_type->put_BottomAppBar(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Page{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageOverrides<D>::OnNavigatedFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnNavigatedFrom(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)this;
            check_hresult(_winrt_abi_type->OnNavigatedFrom(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageOverrides<D>::OnNavigatedTo(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnNavigatedTo(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)this;
            check_hresult(_winrt_abi_type->OnNavigatedTo(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageOverrides<D>::OnNavigatingFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnNavigatingFrom(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>**)this;
            check_hresult(_winrt_abi_type->OnNavigatingFrom(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageStatics<D>::FrameProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FrameProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)this;
            check_hresult(_winrt_abi_type->get_FrameProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageStatics<D>::TopAppBarProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopAppBarProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopAppBarProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPageStatics<D>::BottomAppBarProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPageStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPageStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BottomAppBarProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPageStatics>**)this;
            check_hresult(_winrt_abi_type->get_BottomAppBarProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::Children() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::UIElementCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::IsItemsHost() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemsHost(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->get_IsItemsHost(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::ChildrenTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildrenTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->get_ChildrenTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::ChildrenTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ChildrenTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->put_ChildrenTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::BackgroundTransition() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundTransition(&value));
        }
        return winrt::Microsoft::UI::Xaml::BrushTransition{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanel<D>::BackgroundTransition(winrt::Microsoft::UI::Xaml::BrushTransition const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanel>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundTransition(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Panel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanelStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanelStatics<D>::IsItemsHostProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsItemsHostProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsItemsHostProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPanelStatics<D>::ChildrenTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildrenTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_ChildrenTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::Child() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::Child(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalShift() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalShift(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalShift(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalShift(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalShift(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalShift(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceEndOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceEndOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceEndOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceEndOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalSourceEndOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalSourceEndOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceOffsetKind() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceOffsetKind(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceOffsetKind(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceOffsetKind(winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalSourceOffsetKind(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalSourceOffsetKind(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceStartOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceStartOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceStartOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::HorizontalSourceStartOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalSourceStartOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalSourceStartOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::IsHorizontalShiftClamped() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalShiftClamped(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalShiftClamped(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::IsHorizontalShiftClamped(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHorizontalShiftClamped(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_IsHorizontalShiftClamped(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::IsVerticalShiftClamped() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalShiftClamped(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalShiftClamped(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::IsVerticalShiftClamped(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsVerticalShiftClamped(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_IsVerticalShiftClamped(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::MaxHorizontalShiftRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHorizontalShiftRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_MaxHorizontalShiftRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::MaxHorizontalShiftRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxHorizontalShiftRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_MaxHorizontalShiftRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::MaxVerticalShiftRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxVerticalShiftRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_MaxVerticalShiftRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::MaxVerticalShiftRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxVerticalShiftRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_MaxVerticalShiftRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::Source(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalShift() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalShift(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalShift(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalShift(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalShift(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalShift(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceEndOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceEndOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceEndOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceEndOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalSourceEndOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalSourceEndOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceOffsetKind() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceOffsetKind(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceOffsetKind(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceOffsetKind(winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalSourceOffsetKind(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalSourceOffsetKind(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceStartOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceStartOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceStartOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::VerticalSourceStartOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalSourceStartOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalSourceStartOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::RefreshAutomaticHorizontalOffsets() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RefreshAutomaticHorizontalOffsets());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->RefreshAutomaticHorizontalOffsets());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxView<D>::RefreshAutomaticVerticalOffsets() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RefreshAutomaticVerticalOffsets());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxView>**)this;
            check_hresult(_winrt_abi_type->RefreshAutomaticVerticalOffsets());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ParallaxView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::ChildProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ChildProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::HorizontalSourceEndOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceEndOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceEndOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::HorizontalSourceOffsetKindProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceOffsetKindProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceOffsetKindProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::HorizontalSourceStartOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSourceStartOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSourceStartOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::MaxHorizontalShiftRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHorizontalShiftRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxHorizontalShiftRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::HorizontalShiftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalShiftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalShiftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::IsHorizontalShiftClampedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalShiftClampedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalShiftClampedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::IsVerticalShiftClampedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalShiftClampedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalShiftClampedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::VerticalSourceEndOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceEndOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceEndOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::VerticalSourceOffsetKindProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceOffsetKindProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceOffsetKindProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::VerticalSourceStartOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSourceStartOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSourceStartOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::MaxVerticalShiftRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxVerticalShiftRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxVerticalShiftRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IParallaxViewStatics<D>::VerticalShiftProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalShiftProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalShiftProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Password() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Password(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_Password(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Password(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Password(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_Password(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChar() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PasswordChar(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_PasswordChar(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChar(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PasswordChar(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_PasswordChar(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::IsPasswordRevealButtonEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPasswordRevealButtonEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_IsPasswordRevealButtonEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::IsPasswordRevealButtonEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPasswordRevealButtonEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_IsPasswordRevealButtonEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::MaxLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::MaxLength(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PreventKeyboardDisplayOnProgrammaticFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordRevealMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PasswordRevealMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PasswordRevealMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_PasswordRevealMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordRevealMode(winrt::Microsoft::UI::Xaml::Controls::PasswordRevealMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PasswordRevealMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_PasswordRevealMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::InputScope() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::InputScope{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::InputScope(winrt::Microsoft::UI::Xaml::Input::InputScope const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::CanPasteClipboardContent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PasswordChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->add_PasswordChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, PasswordChanged_revoker>(this, PasswordChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PasswordChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            _winrt_abi_type->remove_PasswordChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::ContextMenuOpening(winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::ContextMenuOpening(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ContextMenuOpening_revoker>(this, ContextMenuOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::ContextMenuOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Paste(winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Paste(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Paste_revoker>(this, Paste(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::Paste(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PasswordBox, winrt::Microsoft::UI::Xaml::Controls::PasswordBoxPasswordChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PasswordChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->add_PasswordChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PasswordBox, winrt::Microsoft::UI::Xaml::Controls::PasswordBoxPasswordChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PasswordChanging_revoker>(this, PasswordChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasswordChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PasswordChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            _winrt_abi_type->remove_PasswordChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBox<D>::PasteFromClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PasteFromClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>**)this;
            check_hresult(_winrt_abi_type->PasteFromClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxPasswordChangingEventArgs<D>::IsContentChanging() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::PasswordProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PasswordProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PasswordProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::PasswordCharProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PasswordCharProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PasswordCharProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::IsPasswordRevealButtonEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPasswordRevealButtonEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPasswordRevealButtonEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::MaxLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::PreventKeyboardDisplayOnProgrammaticFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::PasswordRevealModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PasswordRevealModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PasswordRevealModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::InputScopeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::CanPasteClipboardContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPasswordBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIcon<D>::Data() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIcon>**)this;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Geometry{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIcon<D>::Data(winrt::Microsoft::UI::Xaml::Media::Geometry const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Data(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIcon>**)this;
            check_hresult(_winrt_abi_type->put_Data(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PathIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconSource<D>::Data() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>**)this;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Geometry{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconSource<D>::Data(winrt::Microsoft::UI::Xaml::Media::Geometry const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Data(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>**)this;
            check_hresult(_winrt_abi_type->put_Data(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PathIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconSourceStatics<D>::DataProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DataProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_DataProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPathIconStatics<D>::DataProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DataProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_DataProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeNumber() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeNumber(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_BadgeNumber(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeNumber(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BadgeNumber(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_BadgeNumber(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_BadgeGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BadgeGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_BadgeGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeImageSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeImageSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_BadgeImageSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeImageSource(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BadgeImageSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_BadgeImageSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_BadgeText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::BadgeText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BadgeText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_BadgeText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::IsGroup() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroup(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_IsGroup(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::IsGroup(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsGroup(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_IsGroup(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::Contact() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Contact(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_Contact(&value));
        }
        return winrt::Windows::ApplicationModel::Contacts::Contact{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::Contact(winrt::Windows::ApplicationModel::Contacts::Contact const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Contact(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_Contact(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::DisplayName() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayName(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_DisplayName(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::DisplayName(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayName(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_DisplayName(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::Initials() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Initials(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_Initials(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::Initials(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Initials(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_Initials(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::PreferSmallImage() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreferSmallImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_PreferSmallImage(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::PreferSmallImage(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreferSmallImage(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_PreferSmallImage(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::ProfilePicture() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProfilePicture(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_ProfilePicture(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::ProfilePicture(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ProfilePicture(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->put_ProfilePicture(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPicture<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PersonPictureTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PersonPicture{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::BadgeNumberProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeNumberProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_BadgeNumberProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::BadgeGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_BadgeGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::BadgeImageSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeImageSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_BadgeImageSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::BadgeTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BadgeTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_BadgeTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::IsGroupProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsGroupProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsGroupProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::ContactProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContactProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContactProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::DisplayNameProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayNameProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayNameProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::InitialsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InitialsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_InitialsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::PreferSmallImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreferSmallImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreferSmallImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureStatics<D>::ProfilePictureProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProfilePictureProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>**)this;
            check_hresult(_winrt_abi_type->get_ProfilePictureProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureTemplateSettings<D>::ActualInitials() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualInitials(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ActualInitials(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPersonPictureTemplateSettings<D>::ActualImageBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualImageBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ActualImageBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::ConfirmationButtonsVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ConfirmationButtonsVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_ConfirmationButtonsVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::ConfirmationButtonsVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ConfirmationButtonsVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_ConfirmationButtonsVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::Confirmed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PickerFlyout, winrt::Microsoft::UI::Xaml::Controls::PickerConfirmedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Confirmed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->add_Confirmed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::Confirmed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PickerFlyout, winrt::Microsoft::UI::Xaml::Controls::PickerConfirmedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Confirmed_revoker>(this, Confirmed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::Confirmed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Confirmed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            _winrt_abi_type->remove_Confirmed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyout<D>::ShowAtAsync(winrt::Microsoft::UI::Xaml::FrameworkElement const& target) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>**)this;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<bool>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyoutStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPickerFlyoutStatics<D>::ConfirmationButtonsVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ConfirmationButtonsVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ConfirmationButtonsVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NumberOfPages() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberOfPages(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_NumberOfPages(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NumberOfPages(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NumberOfPages(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_NumberOfPages(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedPageIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPageIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPageIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedPageIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPageIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPageIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::MaxVisiblePips() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxVisiblePips(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_MaxVisiblePips(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::MaxVisiblePips(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxVisiblePips(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_MaxVisiblePips(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::PreviousButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_PreviousButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::PreviousButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreviousButtonVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_PreviousButtonVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NextButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NextButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_NextButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NextButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NextButtonVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_NextButtonVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::PreviousButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_PreviousButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::PreviousButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreviousButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_PreviousButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NextButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NextButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_NextButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NextButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NextButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_NextButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedPipStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPipStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPipStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedPipStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPipStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPipStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NormalPipStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NormalPipStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_NormalPipStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::NormalPipStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NormalPipStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->put_NormalPipStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedIndexChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PipsPager, winrt::Microsoft::UI::Xaml::Controls::PipsPagerSelectedIndexChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectedIndexChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->add_SelectedIndexChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedIndexChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PipsPager, winrt::Microsoft::UI::Xaml::Controls::PipsPagerSelectedIndexChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectedIndexChanged_revoker>(this, SelectedIndexChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::SelectedIndexChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectedIndexChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            _winrt_abi_type->remove_SelectedIndexChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PipsPagerTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager2<D>::WrapMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PipsPagerWrapMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WrapMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>**)this;
            check_hresult(_winrt_abi_type->get_WrapMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPager2<D>::WrapMode(winrt::Microsoft::UI::Xaml::Controls::PipsPagerWrapMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_WrapMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>**)this;
            check_hresult(_winrt_abi_type->put_WrapMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PipsPager{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::NumberOfPagesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NumberOfPagesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_NumberOfPagesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::SelectedPageIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPageIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPageIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::MaxVisiblePipsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxVisiblePipsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxVisiblePipsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::PreviousButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreviousButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::NextButtonVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NextButtonVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_NextButtonVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::PreviousButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreviousButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreviousButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::NextButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NextButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_NextButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::SelectedPipStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPipStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPipStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics<D>::NormalPipStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NormalPipStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>**)this;
            check_hresult(_winrt_abi_type->get_NormalPipStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerStatics2<D>::WrapModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WrapModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2>**)this;
            check_hresult(_winrt_abi_type->get_WrapModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPipsPagerTemplateSettings<D>::PipsPagerItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PipsPagerItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_PipsPagerItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<int32_t>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::Title(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::TitleTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_TitleTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::TitleTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TitleTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_TitleTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::LeftHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeader(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::LeftHeader(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LeftHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_LeftHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::LeftHeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::LeftHeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LeftHeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_LeftHeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::RightHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_RightHeader(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::RightHeader(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RightHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_RightHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::RightHeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightHeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_RightHeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::RightHeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RightHeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_RightHeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::IsLocked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLocked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_IsLocked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::IsLocked(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsLocked(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_IsLocked(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::HeaderFocusVisualPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::PivotHeaderFocusVisualPlacement value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderFocusVisualPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_HeaderFocusVisualPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::HeaderFocusVisualPlacement(winrt::Microsoft::UI::Xaml::Controls::PivotHeaderFocusVisualPlacement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderFocusVisualPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_HeaderFocusVisualPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::IsHeaderItemsCarouselEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHeaderItemsCarouselEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->get_IsHeaderItemsCarouselEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::IsHeaderItemsCarouselEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHeaderItemsCarouselEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->put_IsHeaderItemsCarouselEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoading(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PivotItemLoading(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->add_PivotItemLoading(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoading(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PivotItemLoading_revoker>(this, PivotItemLoading(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoading(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PivotItemLoading(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            _winrt_abi_type->remove_PivotItemLoading(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoaded(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PivotItemLoaded(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->add_PivotItemLoaded(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoaded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PivotItemLoaded_revoker>(this, PivotItemLoaded(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemLoaded(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PivotItemLoaded(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            _winrt_abi_type->remove_PivotItemLoaded(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloading(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PivotItemUnloading(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->add_PivotItemUnloading(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloading(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PivotItemUnloading_revoker>(this, PivotItemUnloading(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloading(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PivotItemUnloading(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            _winrt_abi_type->remove_PivotItemUnloading(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloaded(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PivotItemUnloaded(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            check_hresult(_winrt_abi_type->add_PivotItemUnloaded(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloaded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PivotItemUnloaded_revoker>(this, PivotItemUnloaded(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivot<D>::PivotItemUnloaded(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivot, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PivotItemUnloaded(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivot>**)this;
            _winrt_abi_type->remove_PivotItemUnloaded(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Pivot{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItem<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItem>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItem<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItem>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItemEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PivotItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItemEventArgs<D>::Item(winrt::Microsoft::UI::Xaml::Controls::PivotItem const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Item(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Item(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::PivotItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotItemStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::TitleTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::LeftHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::LeftHeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::RightHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_RightHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::RightHeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightHeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_RightHeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::IsLockedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLockedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsLockedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::HeaderFocusVisualPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderFocusVisualPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderFocusVisualPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::IsHeaderItemsCarouselEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHeaderItemsCarouselEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHeaderItemsCarouselEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::SlideInAnimationGroupProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SlideInAnimationGroupProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->get_SlideInAnimationGroupProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::GetSlideInAnimationGroup(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::PivotSlideInAnimationGroup result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetSlideInAnimationGroup(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->GetSlideInAnimationGroup(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IPivotStatics<D>::SetSlideInAnimationGroup(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, winrt::Microsoft::UI::Xaml::Controls::PivotSlideInAnimationGroup const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetSlideInAnimationGroup(*(void**)(&element), static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>**)this;
            check_hresult(_winrt_abi_type->SetSlideInAnimationGroup(*(void**)(&element), static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::IsIndeterminate() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIndeterminate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_IsIndeterminate(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::IsIndeterminate(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsIndeterminate(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_IsIndeterminate(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::ShowError() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowError(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_ShowError(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::ShowError(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowError(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_ShowError(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::ShowPaused() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowPaused(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_ShowPaused(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::ShowPaused(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowPaused(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->put_ShowPaused(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBar<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBar>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ProgressBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ProgressBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarStatics<D>::IsIndeterminateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIndeterminateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsIndeterminateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarStatics<D>::ShowErrorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowErrorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowErrorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarStatics<D>::ShowPausedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowPausedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowPausedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::ContainerAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContainerAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContainerAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::ContainerAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContainerAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContainerAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::Container2AnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Container2AnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_Container2AnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::Container2AnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Container2AnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_Container2AnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::ContainerAnimationMidPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContainerAnimationMidPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContainerAnimationMidPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::IndicatorLengthDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IndicatorLengthDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IndicatorLengthDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::ClipRect() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClipRect(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ClipRect(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::RectangleGeometry{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::EllipseAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::EllipseAnimationWellPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseAnimationWellPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseAnimationWellPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::EllipseDiameter() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseDiameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseDiameter(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressBarTemplateSettings<D>::EllipseOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::IsActive() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsActive(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_IsActive(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::IsActive(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsActive(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->put_IsActive(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::IsIndeterminate() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIndeterminate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_IsIndeterminate(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::IsIndeterminate(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsIndeterminate(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->put_IsIndeterminate(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ProgressRingTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Value(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Minimum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Minimum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Maximum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRing<D>::Maximum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRing, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRing>**)this;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ProgressRing{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingStatics<D>::IsActiveProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsActiveProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsActiveProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingStatics<D>::IsIndeterminateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIndeterminateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsIndeterminateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingStatics<D>::ValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)this;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingStatics<D>::MinimumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinimumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinimumProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingStatics<D>::MaximumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingTemplateSettings<D>::EllipseDiameter() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseDiameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseDiameter(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingTemplateSettings<D>::EllipseOffset() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EllipseOffset(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EllipseOffset(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IProgressRingTemplateSettings<D>::MaxSideLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSideLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_MaxSideLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButton<D>::GroupName() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupName(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButton>**)this;
            check_hresult(_winrt_abi_type->get_GroupName(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButton<D>::GroupName(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupName(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButton>**)this;
            check_hresult(_winrt_abi_type->put_GroupName(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RadioButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonStatics<D>::GroupNameProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupNameProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupNameProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::ItemTemplate(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::ContainerFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::MaxColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_MaxColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::MaxColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_MaxColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtons<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RadioButtons{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::ItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::MaxColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxColumnsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioButtonsStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItem<D>::IsChecked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItem<D>::IsChecked(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItem<D>::GroupName() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupName(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_GroupName(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItem<D>::GroupName(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GroupName(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_GroupName(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RadioMenuFlyoutItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemStatics<D>::IsCheckedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemStatics<D>::GroupNameProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GroupNameProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_GroupNameProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemStatics2<D>::AreCheckStatesEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreCheckStatesEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_AreCheckStatesEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemStatics2<D>::SetAreCheckStatesEnabled(winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const& object, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAreCheckStatesEnabled(*(void**)(&object), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)this;
            check_hresult(_winrt_abi_type->SetAreCheckStatesEnabled(*(void**)(&object), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRadioMenuFlyoutItemStatics2<D>::GetAreCheckStatesEnabled(winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const& object) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAreCheckStatesEnabled(*(void**)(&object), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>**)this;
            check_hresult(_winrt_abi_type->GetAreCheckStatesEnabled(*(void**)(&object), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::Caption() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Caption(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_Caption(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::Caption(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Caption(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_Caption(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::InitialSetValue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InitialSetValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_InitialSetValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::InitialSetValue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InitialSetValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_InitialSetValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::IsClearEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClearEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_IsClearEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::IsClearEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsClearEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_IsClearEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::IsReadOnly() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::IsReadOnly(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::MaxRating() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxRating(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_MaxRating(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::MaxRating(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxRating(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_MaxRating(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::PlaceholderValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::PlaceholderValue(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::ItemInfo() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemInfo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_ItemInfo(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::ItemInfo(winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemInfo(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_ItemInfo(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::Value(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::ValueChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RatingControl, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::ValueChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RatingControl, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ValueChanged_revoker>(this, ValueChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControl<D>::ValueChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ValueChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControl>**)this;
            _winrt_abi_type->remove_ValueChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RatingControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::CaptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CaptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_CaptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::InitialSetValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InitialSetValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_InitialSetValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::IsClearEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClearEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsClearEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::IsReadOnlyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::MaxRatingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxRatingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxRatingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::PlaceholderValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::ItemInfoProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemInfoProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemInfoProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingControlStatics<D>::ValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::DisabledGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_DisabledGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::DisabledGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_DisabledGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::Glyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_Glyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::Glyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_Glyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PointerOverGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PointerOverGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PointerOverPlaceholderGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PointerOverPlaceholderGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverPlaceholderGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverPlaceholderGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PlaceholderGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::PlaceholderGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::UnsetGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnsetGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->get_UnsetGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<D>::UnsetGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UnsetGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>**)this;
            check_hresult(_winrt_abi_type->put_UnsetGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RatingItemFontInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::DisabledGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::GlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::PlaceholderGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::PointerOverGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::PointerOverPlaceholderGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfoStatics<D>::UnsetGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnsetGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_UnsetGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::DisabledImage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_DisabledImage(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::DisabledImage(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledImage(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_DisabledImage(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::Image() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Image(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_Image(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::Image(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Image(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_Image(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PlaceholderImage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderImage(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PlaceholderImage(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderImage(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderImage(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PointerOverImage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverImage(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PointerOverImage(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverImage(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverImage(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PointerOverPlaceholderImage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderImage(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::PointerOverPlaceholderImage(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverPlaceholderImage(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverPlaceholderImage(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::UnsetImage() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnsetImage(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->get_UnsetImage(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::ImageSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfo<D>::UnsetImage(winrt::Microsoft::UI::Xaml::Media::ImageSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UnsetImage(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>**)this;
            check_hresult(_winrt_abi_type->put_UnsetImage(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RatingItemImageInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::DisabledImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::ImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_ImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::PlaceholderImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::PointerOverImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::PointerOverPlaceholderImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverPlaceholderImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemImageInfoStatics<D>::UnsetImageProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UnsetImageProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>**)this;
            check_hresult(_winrt_abi_type->get_UnsetImageProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRatingItemInfoFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::Visualizer() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Visualizer(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->get_Visualizer(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::Visualizer(winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Visualizer(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->put_Visualizer(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::PullDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PullDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->get_PullDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::PullDirection(winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PullDirection(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->put_PullDirection(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::RefreshRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshContainer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_RefreshRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->add_RefreshRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::RefreshRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshContainer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, RefreshRequested_revoker>(this, RefreshRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::RefreshRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_RefreshRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            _winrt_abi_type->remove_RefreshRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainer<D>::RequestRefresh() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RequestRefresh());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>**)this;
            check_hresult(_winrt_abi_type->RequestRefresh());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RefreshContainer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainerStatics<D>::VisualizerProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VisualizerProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VisualizerProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshContainerStatics<D>::PullDirectionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PullDirectionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>**)this;
            check_hresult(_winrt_abi_type->get_PullDirectionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshInteractionRatioChangedEventArgs<D>::InteractionRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InteractionRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InteractionRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshRequestedEventArgs<D>::GetDeferral() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshStateChangedEventArgs<D>::OldState() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldState(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldState(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshStateChangedEventArgs<D>::NewState() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewState(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewState(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RequestRefresh() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RequestRefresh());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->RequestRefresh());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::State() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_RefreshRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->add_RefreshRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, RefreshRequested_revoker>(this, RefreshRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_RefreshRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            _winrt_abi_type->remove_RefreshRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshStateChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshStateChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_RefreshStateChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            check_hresult(_winrt_abi_type->add_RefreshStateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshStateChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, RefreshStateChanged_revoker>(this, RefreshStateChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizer<D>::RefreshStateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_RefreshStateChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>**)this;
            _winrt_abi_type->remove_RefreshStateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizerStatics<D>::InfoProviderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoProviderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)this;
            check_hresult(_winrt_abi_type->get_InfoProviderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizerStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizerStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRefreshVisualizerStatics<D>::StateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>**)this;
            check_hresult(_winrt_abi_type->get_StateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanel<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RelativePanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::LeftOfProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftOfProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftOfProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetLeftOf(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLeftOf(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetLeftOf(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetLeftOf(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetLeftOf(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetLeftOf(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AboveProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AboveProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AboveProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAbove(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAbove(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAbove(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAbove(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAbove(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAbove(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::RightOfProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightOfProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_RightOfProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetRightOf(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRightOf(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetRightOf(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetRightOf(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetRightOf(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetRightOf(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::BelowProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BelowProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BelowProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetBelow(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBelow(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetBelow(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetBelow(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetBelow(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetBelow(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignHorizontalCenterWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignHorizontalCenterWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignHorizontalCenterWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignHorizontalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignHorizontalCenterWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignHorizontalCenterWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignHorizontalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignHorizontalCenterWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignHorizontalCenterWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignVerticalCenterWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignVerticalCenterWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignVerticalCenterWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignVerticalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignVerticalCenterWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignVerticalCenterWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignVerticalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignVerticalCenterWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignVerticalCenterWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignLeftWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignLeftWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignLeftWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignLeftWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignLeftWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignLeftWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignLeftWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignLeftWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignLeftWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignTopWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignTopWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignTopWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignTopWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignTopWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignTopWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignTopWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignTopWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignTopWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignRightWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignRightWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignRightWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignRightWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignRightWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignRightWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignRightWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignRightWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignRightWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignBottomWithProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignBottomWithProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignBottomWithProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignBottomWith(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignBottomWith(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignBottomWith(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignBottomWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignBottomWith(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignBottomWith(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignLeftWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignLeftWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignLeftWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignLeftWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignLeftWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignLeftWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignLeftWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignLeftWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignLeftWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignTopWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignTopWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignTopWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignTopWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignTopWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignTopWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignTopWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignTopWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignTopWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignRightWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignRightWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignRightWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignRightWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignRightWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignRightWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignRightWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignRightWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignRightWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignBottomWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignBottomWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignBottomWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignBottomWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignBottomWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignBottomWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignBottomWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignBottomWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignBottomWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignHorizontalCenterWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignHorizontalCenterWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignHorizontalCenterWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignHorizontalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignHorizontalCenterWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignHorizontalCenterWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignHorizontalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignHorizontalCenterWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignHorizontalCenterWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::AlignVerticalCenterWithPanelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AlignVerticalCenterWithPanelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AlignVerticalCenterWithPanelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::GetAlignVerticalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlignVerticalCenterWithPanel(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetAlignVerticalCenterWithPanel(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::SetAlignVerticalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAlignVerticalCenterWithPanel(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetAlignVerticalCenterWithPanel(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRelativePanelStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRevealListViewItemPresenterFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RevealListViewItemPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsReadOnly() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsReadOnly(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::AcceptsReturn() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsReturn(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsReturn(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::AcceptsReturn(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AcceptsReturn(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_AcceptsReturn(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextWrapping() const
    {
        winrt::Microsoft::UI::Xaml::TextWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextWrapping(winrt::Microsoft::UI::Xaml::TextWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsSpellCheckEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsSpellCheckEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSpellCheckEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_IsSpellCheckEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsTextPredictionEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsTextPredictionEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextPredictionEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_IsTextPredictionEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Document() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Document(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_Document(&value));
        }
        return winrt::Microsoft::UI::Text::RichEditTextDocument{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::InputScope() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::InputScope{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::InputScope(winrt::Microsoft::UI::Xaml::Input::InputScope const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::PreventKeyboardDisplayOnProgrammaticFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsColorFontEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::IsColorFontEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionHighlightColorWhenNotFocused() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocused(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocused(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionHighlightColorWhenNotFocused(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColorWhenNotFocused(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColorWhenNotFocused(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::MaxLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::MaxLength(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::HorizontalTextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::HorizontalTextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CharacterCasing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CharacterCasing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterCasing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_CharacterCasing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CharacterCasing(winrt::Microsoft::UI::Xaml::Controls::CharacterCasing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterCasing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_CharacterCasing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::DisabledFormattingAccelerators() const
    {
        winrt::Microsoft::UI::Xaml::Controls::DisabledFormattingAccelerators value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledFormattingAccelerators(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_DisabledFormattingAccelerators(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::DisabledFormattingAccelerators(winrt::Microsoft::UI::Xaml::Controls::DisabledFormattingAccelerators const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledFormattingAccelerators(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_DisabledFormattingAccelerators(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextDocument() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextDocument(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_TextDocument(&value));
        }
        return winrt::Microsoft::UI::Text::RichEditTextDocument{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ProofingMenuFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, TextChanged_revoker>(this, TextChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ContextMenuOpening(winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ContextMenuOpening(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ContextMenuOpening_revoker>(this, ContextMenuOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ContextMenuOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Paste(winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Paste(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Paste_revoker>(this, Paste(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::Paste(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionStarted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionStarted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionStarted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionStarted_revoker>(this, TextCompositionStarted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionStarted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionStarted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_TextCompositionStarted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionChanged_revoker>(this, TextCompositionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_TextCompositionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionEnded(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionEnded(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionEnded(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionEnded_revoker>(this, TextCompositionEnded(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextCompositionEnded(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionEnded(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_TextCompositionEnded(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CopyingToClipboard(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CopyingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_CopyingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CopyingToClipboard(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CopyingToClipboard_revoker>(this, CopyingToClipboard(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CopyingToClipboard(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CopyingToClipboard(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_CopyingToClipboard(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CuttingToClipboard(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CuttingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_CuttingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CuttingToClipboard(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CuttingToClipboard_revoker>(this, CuttingToClipboard(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CuttingToClipboard(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CuttingToClipboard(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_CuttingToClipboard(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxSelectionChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxSelectionChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanging_revoker>(this, SelectionChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::SelectionChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_SelectionChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::GetLinguisticAlternativesAsync() const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLinguisticAlternativesAsync(&operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->GetLinguisticAlternativesAsync(&operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<hstring>>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ClipboardCopyFormat() const
    {
        winrt::Microsoft::UI::Xaml::Controls::RichEditClipboardFormat value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClipboardCopyFormat(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_ClipboardCopyFormat(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::ClipboardCopyFormat(winrt::Microsoft::UI::Xaml::Controls::RichEditClipboardFormat const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ClipboardCopyFormat(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_ClipboardCopyFormat(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::DesiredCandidateWindowAlignment() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::DesiredCandidateWindowAlignment(winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DesiredCandidateWindowAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->put_DesiredCandidateWindowAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CandidateWindowBoundsChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CandidateWindowBoundsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_CandidateWindowBoundsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CandidateWindowBoundsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CandidateWindowBoundsChanged_revoker>(this, CandidateWindowBoundsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::CandidateWindowBoundsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CandidateWindowBoundsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_CandidateWindowBoundsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxTextChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            check_hresult(_winrt_abi_type->add_TextChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxTextChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextChanging_revoker>(this, TextChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBox<D>::TextChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>**)this;
            _winrt_abi_type->remove_TextChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RichEditBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxSelectionChangingEventArgs<D>::SelectionStart() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxSelectionChangingEventArgs<D>::SelectionLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxSelectionChangingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxSelectionChangingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::IsReadOnlyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::AcceptsReturnProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsReturnProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsReturnProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::TextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::TextWrappingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::IsSpellCheckEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::IsTextPredictionEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::InputScopeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::PreventKeyboardDisplayOnProgrammaticFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::IsColorFontEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::SelectionHighlightColorWhenNotFocusedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocusedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocusedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::MaxLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::HorizontalTextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::CharacterCasingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterCasingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterCasingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::DisabledFormattingAcceleratorsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledFormattingAcceleratorsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledFormattingAcceleratorsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::ProofingMenuFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::DesiredCandidateWindowAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxStatics<D>::ClipboardCopyFormatProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClipboardCopyFormatProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_ClipboardCopyFormatProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichEditBoxTextChangingEventArgs<D>::IsContentChanging() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::FontStretch(winrt::Windows::UI::Text::FontStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextWrapping() const
    {
        winrt::Microsoft::UI::Xaml::TextWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextWrapping(winrt::Microsoft::UI::Xaml::TextWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextTrimming() const
    {
        winrt::Microsoft::UI::Xaml::TextTrimming value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextTrimming(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextTrimming(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextTrimming(winrt::Microsoft::UI::Xaml::TextTrimming const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextTrimming(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextTrimming(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Blocks() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Blocks(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Blocks(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::BlockCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::LineHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::LineHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::LineStackingStrategy() const
    {
        winrt::Microsoft::UI::Xaml::LineStackingStrategy value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::LineStackingStrategy(winrt::Microsoft::UI::Xaml::LineStackingStrategy const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::CharacterSpacing() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::CharacterSpacing(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::OverflowContentTarget() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentTarget(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentTarget(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::OverflowContentTarget(winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OverflowContentTarget(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_OverflowContentTarget(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextSelectionEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextSelectionEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextSelectionEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsTextSelectionEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::HasOverflowContent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasOverflowContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_HasOverflowContent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectedText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::ContentStart() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::ContentEnd() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionStart() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionEnd() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionEnd(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionEnd(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::BaselineOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::MaxLines() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::MaxLines(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextLineBounds() const
    {
        winrt::Microsoft::UI::Xaml::TextLineBounds value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextLineBounds(winrt::Microsoft::UI::Xaml::TextLineBounds const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::OpticalMarginAlignment() const
    {
        winrt::Microsoft::UI::Xaml::OpticalMarginAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::OpticalMarginAlignment(winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsColorFontEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsColorFontEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextDecorations() const
    {
        winrt::Windows::UI::Text::TextDecorations value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextDecorations(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextDecorations(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextDecorations(winrt::Windows::UI::Text::TextDecorations const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextDecorations(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextDecorations(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextTrimmed() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::HorizontalTextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::HorizontalTextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextHighlighters() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextHighlighters(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextHighlighters(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Documents::TextHighlighter>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::ContextMenuOpening(winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::ContextMenuOpening(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ContextMenuOpening_revoker>(this, ContextMenuOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::ContextMenuOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextTrimmedChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextTrimmedChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, IsTextTrimmedChanged_revoker>(this, IsTextTrimmedChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::IsTextTrimmedChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::Select(winrt::Microsoft::UI::Xaml::Documents::TextPointer const& start, winrt::Microsoft::UI::Xaml::Documents::TextPointer const& end) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Select(*(void**)(&start), *(void**)(&end)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->Select(*(void**)(&start), *(void**)(&end)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::GetPositionFromPoint(winrt::Windows::Foundation::Point const& point) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPositionFromPoint(impl::bind_in(point), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->GetPositionFromPoint(impl::bind_in(point), &result));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::CopySelectionToClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextIndent() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextIndent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextIndent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlock<D>::TextIndent(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextIndent(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextIndent(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::OverflowContentTarget() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentTarget(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentTarget(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::OverflowContentTarget(winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OverflowContentTarget(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->put_OverflowContentTarget(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::ContentSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_ContentSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::RichTextBlock{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::HasOverflowContent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasOverflowContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_HasOverflowContent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::ContentStart() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::ContentEnd() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::BaselineOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::MaxLines() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::MaxLines(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::IsTextTrimmed() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::IsTextTrimmedChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::IsTextTrimmedChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, IsTextTrimmedChanged_revoker>(this, IsTextTrimmedChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::IsTextTrimmedChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflow<D>::GetPositionFromPoint(winrt::Windows::Foundation::Point const& point) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPositionFromPoint(impl::bind_in(point), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>**)this;
            check_hresult(_winrt_abi_type->GetPositionFromPoint(impl::bind_in(point), &result));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflowStatics<D>::OverflowContentTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflowStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflowStatics<D>::HasOverflowContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasOverflowContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)this;
            check_hresult(_winrt_abi_type->get_HasOverflowContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflowStatics<D>::MaxLinesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockOverflowStatics<D>::IsTextTrimmedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::FontStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextWrappingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextTrimmingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextTrimmingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextTrimmingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::LineHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::LineStackingStrategyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::CharacterSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::OverflowContentTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::IsTextSelectionEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::HasOverflowContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasOverflowContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_HasOverflowContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::SelectedTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::MaxLinesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextLineBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::OpticalMarginAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::IsColorFontEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextDecorationsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextDecorationsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextDecorationsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::IsTextTrimmedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::HorizontalTextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRichTextBlockStatics<D>::TextIndentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextIndentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextIndentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::Height() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Height(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->get_Height(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::Height(winrt::Microsoft::UI::Xaml::GridLength const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Height(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->put_Height(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::MaxHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->get_MaxHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::MaxHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->put_MaxHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::MinHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->get_MinHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::MinHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->put_MinHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinition<D>::ActualHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>**)this;
            check_hresult(_winrt_abi_type->get_ActualHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinitionStatics<D>::HeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinitionStatics<D>::MaxHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IRowDefinitionStatics<D>::MinHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollAnchorProvider<D>::CurrentAnchor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)this;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollAnchorProvider<D>::RegisterAnchorCandidate(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterAnchorCandidate(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)this;
            check_hresult(_winrt_abi_type->RegisterAnchorCandidate(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollAnchorProvider<D>::UnregisterAnchorCandidate(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->UnregisterAnchorCandidate(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>**)this;
            check_hresult(_winrt_abi_type->UnregisterAnchorCandidate(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanVerticallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanVerticallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanHorizontallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanHorizontallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ScrollOwner() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOwner(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ScrollOwner(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::ScrollOwner(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ScrollOwner(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ScrollOwner(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanContentRenderOutsideBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::CanContentRenderOutsideBounds(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanContentRenderOutsideBounds(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CanContentRenderOutsideBounds(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::SizesContentToTemplatedParent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SizesContentToTemplatedParent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SizesContentToTemplatedParent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::SizesContentToTemplatedParent(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SizesContentToTemplatedParent(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SizesContentToTemplatedParent(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::LineUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->LineUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::LineDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->LineDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::LineLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->LineLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::LineRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->LineRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::PageUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->PageUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::PageDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->PageDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::PageLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->PageLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::PageRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->PageRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::MouseWheelUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::MouseWheelDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::MouseWheelLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::MouseWheelRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::SetHorizontalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::SetVerticalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenter<D>::MakeVisible(winrt::Microsoft::UI::Xaml::UIElement const& visual, winrt::Windows::Foundation::Rect const& rectangle) const
    {
        winrt::Windows::Foundation::Rect result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MakeVisible(*(void**)(&visual), impl::bind_in(rectangle), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>**)this;
            check_hresult(_winrt_abi_type->MakeVisible(*(void**)(&visual), impl::bind_in(rectangle), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenterStatics<D>::CanContentRenderOutsideBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollContentPresenterStatics<D>::SizesContentToTemplatedParentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SizesContentToTemplatedParentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SizesContentToTemplatedParentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::CurrentAnchor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_CurrentAnchor(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollPresenter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollPresenter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ScrollPresenter(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExpressionAnimationSources() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpressionAnimationSources(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ExpressionAnimationSources(&value));
        }
        return winrt::Microsoft::UI::Composition::CompositionPropertySet{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollableWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollableHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::State() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingInteractionState value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollBarVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollBarVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollBarVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollBarVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ContentOrientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ContentOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ContentOrientation(winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentOrientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_ContentOrientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollChainMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollChainMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollRailMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollRailMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollRailMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollRailMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollRailMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollRailMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollRailMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollRailMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ComputedHorizontalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ComputedVerticalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ComputedHorizontalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ComputedVerticalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ZoomChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomChainMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_ZoomChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_ZoomMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_ZoomMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::IgnoredInputKinds() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IgnoredInputKinds(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_IgnoredInputKinds(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::IgnoredInputKinds(winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IgnoredInputKinds(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_IgnoredInputKinds(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::MinZoomFactor() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::MinZoomFactor(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::MaxZoomFactor() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::MaxZoomFactor(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::HorizontalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::VerticalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::RegisterAnchorCandidate(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RegisterAnchorCandidate(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->RegisterAnchorCandidate(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::UnregisterAnchorCandidate(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->UnregisterAnchorCandidate(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->UnregisterAnchorCandidate(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollTo(double horizontalOffset, double verticalOffset) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollTo(horizontalOffset, verticalOffset, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ScrollTo(horizontalOffset, verticalOffset, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollTo(double horizontalOffset, double verticalOffset, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollToWithOptions(horizontalOffset, verticalOffset, *(void**)(&options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ScrollToWithOptions(horizontalOffset, verticalOffset, *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollBy(horizontalOffsetDelta, verticalOffsetDelta, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ScrollBy(horizontalOffsetDelta, verticalOffsetDelta, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollByWithOptions(horizontalOffsetDelta, verticalOffsetDelta, *(void**)(&options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ScrollByWithOptions(horizontalOffsetDelta, verticalOffsetDelta, *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::AddScrollVelocity(winrt::Windows::Foundation::Numerics::float2 const& offsetsVelocity, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& inertiaDecayRate) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddScrollVelocity(impl::bind_in(offsetsVelocity), *(void**)(&inertiaDecayRate), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->AddScrollVelocity(impl::bind_in(offsetsVelocity), *(void**)(&inertiaDecayRate), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomTo(float zoomFactor, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& centerPoint) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ZoomTo(zoomFactor, *(void**)(&centerPoint), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ZoomTo(zoomFactor, *(void**)(&centerPoint), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomTo(float zoomFactor, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& centerPoint, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions const& options) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ZoomToWithOptions(zoomFactor, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ZoomToWithOptions(zoomFactor, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomBy(float zoomFactorDelta, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& centerPoint) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ZoomBy(zoomFactorDelta, *(void**)(&centerPoint), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ZoomBy(zoomFactorDelta, *(void**)(&centerPoint), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomBy(float zoomFactorDelta, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& centerPoint, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions const& options) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ZoomByWithOptions(zoomFactorDelta, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->ZoomByWithOptions(zoomFactorDelta, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::AddZoomVelocity(float zoomFactorVelocity, winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const& centerPoint, winrt::Windows::Foundation::IReference<float> const& inertiaDecayRate) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddZoomVelocity(zoomFactorVelocity, *(void**)(&centerPoint), *(void**)(&inertiaDecayRate), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->AddZoomVelocity(zoomFactorVelocity, *(void**)(&centerPoint), *(void**)(&inertiaDecayRate), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExtentChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ExtentChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ExtentChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExtentChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ExtentChanged_revoker>(this, ExtentChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ExtentChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ExtentChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ExtentChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::StateChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, StateChanged_revoker>(this, StateChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::StateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_StateChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_StateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ViewChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ViewChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ViewChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ViewChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ViewChanged_revoker>(this, ViewChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ViewChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ViewChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ViewChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollAnimationStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ScrollAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ScrollAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollAnimationStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ScrollAnimationStarting_revoker>(this, ScrollAnimationStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollAnimationStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ScrollAnimationStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ScrollAnimationStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomAnimationStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ZoomAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ZoomAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomAnimationStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ZoomAnimationStarting_revoker>(this, ZoomAnimationStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomAnimationStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ZoomAnimationStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ZoomAnimationStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ScrollCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ScrollCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ScrollCompleted_revoker>(this, ScrollCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ScrollCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ScrollCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ScrollCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ZoomCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_ZoomCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ZoomCompleted_revoker>(this, ZoomCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::ZoomCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ZoomCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_ZoomCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::BringingIntoView(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_BringingIntoView(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_BringingIntoView(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::BringingIntoView(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, BringingIntoView_revoker>(this, BringingIntoView(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::BringingIntoView(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_BringingIntoView(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_BringingIntoView(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::AnchorRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_AnchorRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            check_hresult(_winrt_abi_type->add_AnchorRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::AnchorRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, AnchorRequested_revoker>(this, AnchorRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollView<D>::AnchorRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_AnchorRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollView>**)this;
            _winrt_abi_type->remove_AnchorRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ScrollPresenterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollPresenterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ScrollPresenterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::HorizontalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::VerticalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ContentOrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentOrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentOrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::HorizontalScrollChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::VerticalScrollChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::HorizontalScrollRailModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::VerticalScrollRailModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::HorizontalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::VerticalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ComputedHorizontalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ComputedVerticalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ComputedHorizontalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ComputedVerticalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ZoomChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomChainModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::ZoomModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::IgnoredInputKindsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IgnoredInputKindsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IgnoredInputKindsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::MinZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinZoomFactorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::MaxZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxZoomFactorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::HorizontalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewStatics<D>::VerticalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollBarVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollBarVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollBarVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollBarVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsHorizontalRailEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalRailEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalRailEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsHorizontalRailEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHorizontalRailEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsHorizontalRailEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsVerticalRailEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalRailEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalRailEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsVerticalRailEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsVerticalRailEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsVerticalRailEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsHorizontalScrollChainingEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalScrollChainingEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalScrollChainingEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsHorizontalScrollChainingEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsHorizontalScrollChainingEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsHorizontalScrollChainingEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsVerticalScrollChainingEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalScrollChainingEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalScrollChainingEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsVerticalScrollChainingEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsVerticalScrollChainingEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsVerticalScrollChainingEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsZoomChainingEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomChainingEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomChainingEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsZoomChainingEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomChainingEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomChainingEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsScrollInertiaEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsScrollInertiaEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsScrollInertiaEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsScrollInertiaEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsScrollInertiaEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsScrollInertiaEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsZoomInertiaEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomInertiaEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomInertiaEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsZoomInertiaEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomInertiaEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomInertiaEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalScrollMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ZoomMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ZoomMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomMode(winrt::Microsoft::UI::Xaml::Controls::ZoomMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_ZoomMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalSnapPointsAlignment() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalSnapPointsAlignment(winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalSnapPointsAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalSnapPointsAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalSnapPointsAlignment() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalSnapPointsAlignment(winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalSnapPointsAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_VerticalSnapPointsAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalSnapPointsType() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SnapPointsType value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalSnapPointsType(winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalSnapPointsType(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalSnapPointsType(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalSnapPointsType() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SnapPointsType value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalSnapPointsType(winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalSnapPointsType(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_VerticalSnapPointsType(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomSnapPointsType() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SnapPointsType value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsType(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomSnapPointsType(winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomSnapPointsType(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_ZoomSnapPointsType(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ScrollableWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ComputedHorizontalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ScrollableHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ComputedVerticalScrollBarVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::MinZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::MinZoomFactor(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::MaxZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::MaxZoomFactor(float value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomSnapPoints() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomSnapPoints(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ZoomSnapPoints(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<float>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::TopLeftHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopLeftHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_TopLeftHeader(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::TopLeftHeader(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopLeftHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_TopLeftHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::LeftHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeader(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::LeftHeader(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LeftHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_LeftHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::TopHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_TopHeader(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::TopHeader(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_TopHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ReduceViewportForCoreInputViewOcclusions() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReduceViewportForCoreInputViewOcclusions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_ReduceViewportForCoreInputViewOcclusions(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ReduceViewportForCoreInputViewOcclusions(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ReduceViewportForCoreInputViewOcclusions(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_ReduceViewportForCoreInputViewOcclusions(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::HorizontalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::VerticalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::CanContentRenderOutsideBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::CanContentRenderOutsideBounds(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanContentRenderOutsideBounds(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_CanContentRenderOutsideBounds(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::AnchorRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer, winrt::Microsoft::UI::Xaml::Controls::AnchorRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_AnchorRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->add_AnchorRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::AnchorRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer, winrt::Microsoft::UI::Xaml::Controls::AnchorRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, AnchorRequested_revoker>(this, AnchorRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::AnchorRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_AnchorRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            _winrt_abi_type->remove_AnchorRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanging(winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ViewChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->add_ViewChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanging(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ViewChanging_revoker>(this, ViewChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ViewChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            _winrt_abi_type->remove_ViewChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanged(winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ViewChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->add_ViewChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ViewChanged_revoker>(this, ViewChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ViewChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ViewChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            _winrt_abi_type->remove_ViewChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationStarted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DirectManipulationStarted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->add_DirectManipulationStarted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationStarted(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, DirectManipulationStarted_revoker>(this, DirectManipulationStarted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationStarted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DirectManipulationStarted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            _winrt_abi_type->remove_DirectManipulationStarted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationCompleted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DirectManipulationCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->add_DirectManipulationCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationCompleted(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, DirectManipulationCompleted_revoker>(this, DirectManipulationCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::DirectManipulationCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DirectManipulationCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            _winrt_abi_type->remove_DirectManipulationCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ScrollToHorizontalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollToHorizontalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->ScrollToHorizontalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ScrollToVerticalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ScrollToVerticalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->ScrollToVerticalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ZoomToFactor(float factor) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ZoomToFactor(factor));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->ZoomToFactor(factor));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ChangeView(winrt::Windows::Foundation::IReference<double> const& horizontalOffset, winrt::Windows::Foundation::IReference<double> const& verticalOffset, winrt::Windows::Foundation::IReference<float> const& zoomFactor) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ChangeView(*(void**)(&horizontalOffset), *(void**)(&verticalOffset), *(void**)(&zoomFactor), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->ChangeView(*(void**)(&horizontalOffset), *(void**)(&verticalOffset), *(void**)(&zoomFactor), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::ChangeView(winrt::Windows::Foundation::IReference<double> const& horizontalOffset, winrt::Windows::Foundation::IReference<double> const& verticalOffset, winrt::Windows::Foundation::IReference<float> const& zoomFactor, bool disableAnimation) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ChangeViewWithOptionalAnimation(*(void**)(&horizontalOffset), *(void**)(&verticalOffset), *(void**)(&zoomFactor), disableAnimation, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->ChangeViewWithOptionalAnimation(*(void**)(&horizontalOffset), *(void**)(&verticalOffset), *(void**)(&zoomFactor), disableAnimation, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::InvalidateScrollInfo() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InvalidateScrollInfo());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->InvalidateScrollInfo());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsDeferredScrollingEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDeferredScrollingEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_IsDeferredScrollingEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::IsDeferredScrollingEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDeferredScrollingEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_IsDeferredScrollingEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::BringIntoViewOnFocusChange() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BringIntoViewOnFocusChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->get_BringIntoViewOnFocusChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewer<D>::BringIntoViewOnFocusChange(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BringIntoViewOnFocusChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>**)this;
            check_hresult(_winrt_abi_type->put_BringIntoViewOnFocusChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalSnapPointsAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalSnapPointsAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalSnapPointsTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPointsTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalSnapPointsTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSnapPointsTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ZoomSnapPointsTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ViewportWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ScrollableWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ComputedHorizontalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ExtentWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ViewportHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ScrollableHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ComputedVerticalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ExtentHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::MinZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinZoomFactorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::MaxZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxZoomFactorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomFactorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ZoomSnapPointsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomSnapPointsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::TopLeftHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopLeftHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopLeftHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::LeftHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::TopHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ReduceViewportForCoreInputViewOcclusionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReduceViewportForCoreInputViewOcclusionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReduceViewportForCoreInputViewOcclusionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatioProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetHorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetHorizontalScrollBarVisibility(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetHorizontalScrollBarVisibility(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetHorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& horizontalScrollBarVisibility) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalScrollBarVisibility(*(void**)(&element), static_cast<int32_t>(horizontalScrollBarVisibility)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalScrollBarVisibility(*(void**)(&element), static_cast<int32_t>(horizontalScrollBarVisibility)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalScrollBarVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollBarVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetVerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVerticalScrollBarVisibility(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetVerticalScrollBarVisibility(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetVerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& verticalScrollBarVisibility) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalScrollBarVisibility(*(void**)(&element), static_cast<int32_t>(verticalScrollBarVisibility)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetVerticalScrollBarVisibility(*(void**)(&element), static_cast<int32_t>(verticalScrollBarVisibility)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsHorizontalRailEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalRailEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalRailEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsHorizontalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsHorizontalRailEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsHorizontalRailEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsHorizontalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isHorizontalRailEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsHorizontalRailEnabled(*(void**)(&element), isHorizontalRailEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsHorizontalRailEnabled(*(void**)(&element), isHorizontalRailEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsVerticalRailEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalRailEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalRailEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsVerticalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsVerticalRailEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsVerticalRailEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsVerticalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isVerticalRailEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsVerticalRailEnabled(*(void**)(&element), isVerticalRailEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsVerticalRailEnabled(*(void**)(&element), isVerticalRailEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsHorizontalScrollChainingEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsHorizontalScrollChainingEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsHorizontalScrollChainingEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsHorizontalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsHorizontalScrollChainingEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsHorizontalScrollChainingEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsHorizontalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isHorizontalScrollChainingEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsHorizontalScrollChainingEnabled(*(void**)(&element), isHorizontalScrollChainingEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsHorizontalScrollChainingEnabled(*(void**)(&element), isHorizontalScrollChainingEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsVerticalScrollChainingEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVerticalScrollChainingEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVerticalScrollChainingEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsVerticalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsVerticalScrollChainingEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsVerticalScrollChainingEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsVerticalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isVerticalScrollChainingEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsVerticalScrollChainingEnabled(*(void**)(&element), isVerticalScrollChainingEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsVerticalScrollChainingEnabled(*(void**)(&element), isVerticalScrollChainingEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsZoomChainingEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomChainingEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomChainingEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsZoomChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsZoomChainingEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsZoomChainingEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsZoomChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isZoomChainingEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsZoomChainingEnabled(*(void**)(&element), isZoomChainingEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsZoomChainingEnabled(*(void**)(&element), isZoomChainingEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsScrollInertiaEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsScrollInertiaEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsScrollInertiaEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsScrollInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsScrollInertiaEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsScrollInertiaEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsScrollInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isScrollInertiaEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsScrollInertiaEnabled(*(void**)(&element), isScrollInertiaEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsScrollInertiaEnabled(*(void**)(&element), isScrollInertiaEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsZoomInertiaEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomInertiaEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomInertiaEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsZoomInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsZoomInertiaEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsZoomInertiaEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsZoomInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isZoomInertiaEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsZoomInertiaEnabled(*(void**)(&element), isZoomInertiaEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsZoomInertiaEnabled(*(void**)(&element), isZoomInertiaEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::HorizontalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetHorizontalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollMode result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetHorizontalScrollMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetHorizontalScrollMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetHorizontalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& horizontalScrollMode) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalScrollMode(*(void**)(&element), static_cast<int32_t>(horizontalScrollMode)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalScrollMode(*(void**)(&element), static_cast<int32_t>(horizontalScrollMode)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::VerticalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetVerticalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollMode result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVerticalScrollMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetVerticalScrollMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetVerticalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& verticalScrollMode) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalScrollMode(*(void**)(&element), static_cast<int32_t>(verticalScrollMode)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetVerticalScrollMode(*(void**)(&element), static_cast<int32_t>(verticalScrollMode)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::ZoomModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetZoomMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::ZoomMode result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetZoomMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetZoomMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetZoomMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ZoomMode const& zoomMode) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetZoomMode(*(void**)(&element), static_cast<int32_t>(zoomMode)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetZoomMode(*(void**)(&element), static_cast<int32_t>(zoomMode)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::CanContentRenderOutsideBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanContentRenderOutsideBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetCanContentRenderOutsideBounds(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetCanContentRenderOutsideBounds(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetCanContentRenderOutsideBounds(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetCanContentRenderOutsideBounds(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool canContentRenderOutsideBounds) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetCanContentRenderOutsideBounds(*(void**)(&element), canContentRenderOutsideBounds));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetCanContentRenderOutsideBounds(*(void**)(&element), canContentRenderOutsideBounds));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::IsDeferredScrollingEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDeferredScrollingEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDeferredScrollingEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetIsDeferredScrollingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsDeferredScrollingEnabled(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsDeferredScrollingEnabled(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetIsDeferredScrollingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isDeferredScrollingEnabled) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsDeferredScrollingEnabled(*(void**)(&element), isDeferredScrollingEnabled));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetIsDeferredScrollingEnabled(*(void**)(&element), isDeferredScrollingEnabled));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::BringIntoViewOnFocusChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BringIntoViewOnFocusChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->get_BringIntoViewOnFocusChangeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::GetBringIntoViewOnFocusChange(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetBringIntoViewOnFocusChange(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->GetBringIntoViewOnFocusChange(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerStatics<D>::SetBringIntoViewOnFocusChange(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool bringIntoViewOnFocusChange) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetBringIntoViewOnFocusChange(*(void**)(&element), bringIntoViewOnFocusChange));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>**)this;
            check_hresult(_winrt_abi_type->SetBringIntoViewOnFocusChange(*(void**)(&element), bringIntoViewOnFocusChange));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerView<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerView<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerView<D>::ZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>**)this;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerViewChangedEventArgs<D>::IsIntermediate() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsIntermediate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsIntermediate(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerViewChangingEventArgs<D>::NextView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NextView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NextView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollViewerView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerViewChangingEventArgs<D>::FinalView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FinalView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_FinalView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollViewerView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollViewerViewChangingEventArgs<D>::IsInertial() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsInertial(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsInertial(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingAnchorRequestedEventArgs<D>::AnchorCandidates() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnchorCandidates(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AnchorCandidates(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::UIElement>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingAnchorRequestedEventArgs<D>::AnchorElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnchorElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AnchorElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingAnchorRequestedEventArgs<D>::AnchorElement(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AnchorElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_AnchorElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::SnapPointsMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::SnapPointsMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::RequestEventArgs() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RequestEventArgs(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RequestEventArgs(&value));
        }
        return winrt::Microsoft::UI::Xaml::BringIntoViewRequestedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::TargetHorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetHorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_TargetHorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::TargetVerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetVerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_TargetVerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingBringingIntoViewEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollAnimationStartingEventArgs<D>::Animation() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Animation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Animation(&value));
        }
        return winrt::Microsoft::UI::Composition::CompositionAnimation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollAnimationStartingEventArgs<D>::Animation(winrt::Microsoft::UI::Composition::CompositionAnimation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Animation(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Animation(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollAnimationStartingEventArgs<D>::StartPosition() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StartPosition(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_StartPosition(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollAnimationStartingEventArgs<D>::EndPosition() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EndPosition(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_EndPosition(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollAnimationStartingEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollCompletedEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptions<D>::AnimationMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnimationMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)this;
            check_hresult(_winrt_abi_type->get_AnimationMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptions<D>::AnimationMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AnimationMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)this;
            check_hresult(_winrt_abi_type->put_AnimationMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptions<D>::SnapPointsMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)this;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptions<D>::SnapPointsMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>**)this;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptionsFactory<D>::CreateInstance(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(static_cast<int32_t>(animationMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(static_cast<int32_t>(animationMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingScrollOptionsFactory<D>::CreateInstance2(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance2(static_cast<int32_t>(animationMode), static_cast<int32_t>(snapPointsMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance2(static_cast<int32_t>(animationMode), static_cast<int32_t>(snapPointsMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::CenterPoint() const
    {
        winrt::Windows::Foundation::Numerics::float2 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CenterPoint(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CenterPoint(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::StartZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StartZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_StartZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::EndZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EndZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_EndZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::Animation() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Animation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Animation(&value));
        }
        return winrt::Microsoft::UI::Composition::CompositionAnimation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::Animation(winrt::Microsoft::UI::Composition::CompositionAnimation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Animation(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Animation(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomAnimationStartingEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomCompletedEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptions<D>::AnimationMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AnimationMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)this;
            check_hresult(_winrt_abi_type->get_AnimationMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptions<D>::AnimationMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AnimationMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)this;
            check_hresult(_winrt_abi_type->put_AnimationMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptions<D>::SnapPointsMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)this;
            check_hresult(_winrt_abi_type->get_SnapPointsMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptions<D>::SnapPointsMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>**)this;
            check_hresult(_winrt_abi_type->put_SnapPointsMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptionsFactory<D>::CreateInstance(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(static_cast<int32_t>(animationMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(static_cast<int32_t>(animationMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IScrollingZoomOptionsFactory<D>::CreateInstance2(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance2(static_cast<int32_t>(animationMode), static_cast<int32_t>(snapPointsMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance2(static_cast<int32_t>(animationMode), static_cast<int32_t>(snapPointsMode), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISectionsInViewChangedEventArgs<D>::AddedSections() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddedSections(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AddedSections(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISectionsInViewChangedEventArgs<D>::RemovedSections() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RemovedSections(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RemovedSections(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectionChangedEventArgs<D>::AddedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectionChangedEventArgs<D>::RemovedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectionChangedEventArgsFactory<D>::CreateInstanceWithRemovedItemsAndAddedItems(param::vector<winrt::Windows::Foundation::IInspectable> const& removedItems, param::vector<winrt::Windows::Foundation::IInspectable> const& addedItems, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstanceWithRemovedItemsAndAddedItems(*(void**)(&removedItems), *(void**)(&addedItems), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstanceWithRemovedItemsAndAddedItems(*(void**)(&removedItems), *(void**)(&addedItems), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::SelectedItem(winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::SelectionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SelectorBar, winrt::Microsoft::UI::Xaml::Controls::SelectorBarSelectionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::SelectionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SelectorBar, winrt::Microsoft::UI::Xaml::Controls::SelectorBarSelectionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBar<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SelectorBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItem<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItem<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItem<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)this;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItem<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItemStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarItemStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarStatics<D>::ItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISelectorBarStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ZoomedInView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomedInView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->get_ZoomedInView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ZoomedInView(winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomedInView(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->put_ZoomedInView(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ZoomedOutView() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomedOutView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->get_ZoomedOutView(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ZoomedOutView(winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ZoomedOutView(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->put_ZoomedOutView(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::IsZoomedInViewActive() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewActive(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewActive(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::IsZoomedInViewActive(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomedInViewActive(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomedInViewActive(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::CanChangeViews() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanChangeViews(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->get_CanChangeViews(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::CanChangeViews(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanChangeViews(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->put_CanChangeViews(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeStarted(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ViewChangeStarted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->add_ViewChangeStarted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeStarted(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ViewChangeStarted_revoker>(this, ViewChangeStarted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeStarted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ViewChangeStarted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            _winrt_abi_type->remove_ViewChangeStarted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeCompleted(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ViewChangeCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->add_ViewChangeCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeCompleted(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ViewChangeCompleted_revoker>(this, ViewChangeCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ViewChangeCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ViewChangeCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            _winrt_abi_type->remove_ViewChangeCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::ToggleActiveView() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ToggleActiveView());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->ToggleActiveView());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::IsZoomOutButtonEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomOutButtonEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomOutButtonEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoom<D>::IsZoomOutButtonEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomOutButtonEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomOutButtonEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::SemanticZoomOwner() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwner(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->get_SemanticZoomOwner(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SemanticZoom{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::SemanticZoomOwner(winrt::Microsoft::UI::Xaml::Controls::SemanticZoom const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SemanticZoomOwner(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->put_SemanticZoomOwner(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::IsActiveView() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsActiveView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->get_IsActiveView(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::IsActiveView(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsActiveView(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->put_IsActiveView(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::IsZoomedInView() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomedInView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomedInView(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::IsZoomedInView(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsZoomedInView(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->put_IsZoomedInView(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::InitializeViewChange() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InitializeViewChange());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->InitializeViewChange());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::CompleteViewChange() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CompleteViewChange());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->CompleteViewChange());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::MakeVisible(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& item) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MakeVisible(*(void**)(&item)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->MakeVisible(*(void**)(&item)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::StartViewChangeFrom(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& source, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& destination) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->StartViewChangeFrom(*(void**)(&source), *(void**)(&destination)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->StartViewChangeFrom(*(void**)(&source), *(void**)(&destination)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::StartViewChangeTo(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& source, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& destination) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->StartViewChangeTo(*(void**)(&source), *(void**)(&destination)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->StartViewChangeTo(*(void**)(&source), *(void**)(&destination)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::CompleteViewChangeFrom(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& source, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& destination) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CompleteViewChangeFrom(*(void**)(&source), *(void**)(&destination)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->CompleteViewChangeFrom(*(void**)(&source), *(void**)(&destination)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomInformation<D>::CompleteViewChangeTo(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& source, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& destination) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CompleteViewChangeTo(*(void**)(&source), *(void**)(&destination)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>**)this;
            check_hresult(_winrt_abi_type->CompleteViewChangeTo(*(void**)(&source), *(void**)(&destination)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomLocation<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomLocation<D>::Item(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Item(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)this;
            check_hresult(_winrt_abi_type->put_Item(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomLocation<D>::Bounds() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Bounds(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)this;
            check_hresult(_winrt_abi_type->get_Bounds(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomLocation<D>::Bounds(winrt::Windows::Foundation::Rect const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Bounds(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>**)this;
            check_hresult(_winrt_abi_type->put_Bounds(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomStatics<D>::ZoomedInViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomedInViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomedInViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomStatics<D>::ZoomedOutViewProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomedOutViewProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)this;
            check_hresult(_winrt_abi_type->get_ZoomedOutViewProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomStatics<D>::IsZoomedInViewActiveProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewActiveProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomedInViewActiveProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomStatics<D>::CanChangeViewsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanChangeViewsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanChangeViewsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomStatics<D>::IsZoomOutButtonEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsZoomOutButtonEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsZoomOutButtonEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::IsSourceZoomedInView() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSourceZoomedInView(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsSourceZoomedInView(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::IsSourceZoomedInView(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSourceZoomedInView(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_IsSourceZoomedInView(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::SourceItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SourceItem(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::SourceItem(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SourceItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_SourceItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::DestinationItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DestinationItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DestinationItem(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISemanticZoomViewChangedEventArgs<D>::DestinationItem(winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DestinationItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_DestinationItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IntermediateValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IntermediateValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_IntermediateValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IntermediateValue(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IntermediateValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_IntermediateValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::StepFrequency() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StepFrequency(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_StepFrequency(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::StepFrequency(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_StepFrequency(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_StepFrequency(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::SnapsTo() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::SliderSnapsTo value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SnapsTo(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_SnapsTo(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::SnapsTo(winrt::Microsoft::UI::Xaml::Controls::Primitives::SliderSnapsTo const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SnapsTo(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_SnapsTo(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::TickFrequency() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TickFrequency(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_TickFrequency(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::TickFrequency(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TickFrequency(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_TickFrequency(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::TickPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::TickPlacement value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TickPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_TickPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::TickPlacement(winrt::Microsoft::UI::Xaml::Controls::Primitives::TickPlacement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TickPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_TickPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IsDirectionReversed() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDirectionReversed(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_IsDirectionReversed(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IsDirectionReversed(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDirectionReversed(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_IsDirectionReversed(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IsThumbToolTipEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsThumbToolTipEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_IsThumbToolTipEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::IsThumbToolTipEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsThumbToolTipEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_IsThumbToolTipEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::ThumbToolTipValueConverter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ThumbToolTipValueConverter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_ThumbToolTipValueConverter(&value));
        }
        return winrt::Microsoft::UI::Xaml::Data::IValueConverter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::ThumbToolTipValueConverter(winrt::Microsoft::UI::Xaml::Data::IValueConverter const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ThumbToolTipValueConverter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_ThumbToolTipValueConverter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISlider<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISlider>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Slider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::IntermediateValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IntermediateValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_IntermediateValueProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::StepFrequencyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StepFrequencyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_StepFrequencyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::SnapsToProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SnapsToProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_SnapsToProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::TickFrequencyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TickFrequencyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_TickFrequencyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::TickPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TickPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_TickPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::IsDirectionReversedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDirectionReversedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDirectionReversedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::IsThumbToolTipEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsThumbToolTipEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsThumbToolTipEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::ThumbToolTipValueConverterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ThumbToolTipValueConverterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_ThumbToolTipValueConverterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISliderStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Flyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Flyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->get_Flyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Flyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Flyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->put_Flyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Command() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Command(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::CommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::CommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Click(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitButton, winrt::Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Click(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            check_hresult(_winrt_abi_type->add_Click(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Click(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitButton, winrt::Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Click_revoker>(this, Click(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButton<D>::Click(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Click(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButton>**)this;
            _winrt_abi_type->remove_Click(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SplitButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButtonStatics<D>::FlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButtonStatics<D>::CommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitButtonStatics<D>::CommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::Pane() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_Pane(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::Pane(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Pane(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_Pane(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::IsPaneOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::IsPaneOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsPaneOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_IsPaneOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::OpenPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::OpenPaneLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpenPaneLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_OpenPaneLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::CompactPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::CompactPaneLength(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CompactPaneLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_CompactPaneLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PanePlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SplitViewPanePlacement value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanePlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_PanePlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PanePlacement(winrt::Microsoft::UI::Xaml::Controls::SplitViewPanePlacement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PanePlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_PanePlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::DisplayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SplitViewDisplayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_DisplayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::DisplayMode(winrt::Microsoft::UI::Xaml::Controls::SplitViewDisplayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_DisplayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_PaneBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PaneBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_PaneBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneClosing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->add_PaneClosing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PaneClosing_revoker>(this, PaneClosing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneClosing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            _winrt_abi_type->remove_PaneClosing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneClosed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->add_PaneClosed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneClosed_revoker>(this, PaneClosed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneClosed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneClosed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            _winrt_abi_type->remove_PaneClosed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpening(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->add_PaneOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpening(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneOpening_revoker>(this, PaneOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            _winrt_abi_type->remove_PaneOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpened(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PaneOpened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            check_hresult(_winrt_abi_type->add_PaneOpened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, PaneOpened_revoker>(this, PaneOpened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitView<D>::PaneOpened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PaneOpened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitView>**)this;
            _winrt_abi_type->remove_PaneOpened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SplitView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewPaneClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewPaneClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::PaneProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::IsPaneOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPaneOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPaneOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::OpenPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::CompactPaneLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::PanePlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanePlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PanePlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::DisplayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisplayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::PaneBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaneBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaneBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISplitViewStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayout<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayout<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayout<D>::Spacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Spacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)this;
            check_hresult(_winrt_abi_type->get_Spacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayout<D>::Spacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Spacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayout>**)this;
            check_hresult(_winrt_abi_type->put_Spacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StackLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayoutStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackLayoutStatics<D>::SpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_SpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::AreScrollSnapPointsRegular() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegular(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegular(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::AreScrollSnapPointsRegular(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreScrollSnapPointsRegular(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_AreScrollSnapPointsRegular(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BackgroundSizing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BackgroundSizing(winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_BackgroundSizing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_BorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_BorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::BorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_BorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::CornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::CornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_CornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Spacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Spacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_Spacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanel<D>::Spacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Spacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_Spacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StackPanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::AreScrollSnapPointsRegularProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegularProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegularProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::BackgroundSizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundSizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::BorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::BorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_BorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::CornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_CornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStackPanelStatics<D>::SpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_SpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStyleSelector<D>::SelectStyle(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStyleSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectStyle(*(void**)(&item), *(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelector>**)this;
            check_hresult(_winrt_abi_type->SelectStyle(*(void**)(&item), *(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::Style{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStyleSelectorFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IStyleSelectorOverrides<D>::SelectStyleCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectStyleCore(*(void**)(&item), *(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>**)this;
            check_hresult(_winrt_abi_type->SelectStyleCore(*(void**)(&item), *(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::Style{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainBackgroundPanelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwapChainBackgroundPanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CompositionScaleX() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompositionScaleX(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)this;
            check_hresult(_winrt_abi_type->get_CompositionScaleX(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CompositionScaleY() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompositionScaleY(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)this;
            check_hresult(_winrt_abi_type->get_CompositionScaleY(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CompositionScaleChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CompositionScaleChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)this;
            check_hresult(_winrt_abi_type->add_CompositionScaleChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CompositionScaleChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, CompositionScaleChanged_revoker>(this, CompositionScaleChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CompositionScaleChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CompositionScaleChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)this;
            _winrt_abi_type->remove_CompositionScaleChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanel<D>::CreateCoreIndependentInputSource(winrt::Microsoft::UI::Input::InputPointerSourceDeviceKinds const& deviceKinds) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateCoreIndependentInputSource(static_cast<uint32_t>(deviceKinds), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>**)this;
            check_hresult(_winrt_abi_type->CreateCoreIndependentInputSource(static_cast<uint32_t>(deviceKinds), &result));
        }
        return winrt::Microsoft::UI::Input::InputPointerSource{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanelFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanelStatics<D>::CompositionScaleXProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompositionScaleXProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompositionScaleXProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwapChainPanelStatics<D>::CompositionScaleYProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompositionScaleYProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_CompositionScaleYProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::LeftItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->get_LeftItems(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItems{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::LeftItems(winrt::Microsoft::UI::Xaml::Controls::SwipeItems const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LeftItems(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->put_LeftItems(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::RightItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->get_RightItems(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItems{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::RightItems(winrt::Microsoft::UI::Xaml::Controls::SwipeItems const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RightItems(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->put_RightItems(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::TopItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->get_TopItems(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItems{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::TopItems(winrt::Microsoft::UI::Xaml::Controls::SwipeItems const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopItems(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->put_TopItems(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::BottomItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BottomItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->get_BottomItems(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItems{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::BottomItems(winrt::Microsoft::UI::Xaml::Controls::SwipeItems const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BottomItems(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->put_BottomItems(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControl<D>::Close() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Close());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>**)this;
            check_hresult(_winrt_abi_type->Close());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControlStatics<D>::LeftItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LeftItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_LeftItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControlStatics<D>::RightItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RightItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_RightItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControlStatics<D>::TopItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeControlStatics<D>::BottomItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BottomItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_BottomItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Command() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Command(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::CommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::CommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::BehaviorOnInvoked() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BehaviorOnInvoked(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->get_BehaviorOnInvoked(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::BehaviorOnInvoked(winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_BehaviorOnInvoked(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->put_BehaviorOnInvoked(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Invoked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwipeItem, winrt::Microsoft::UI::Xaml::Controls::SwipeItemInvokedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Invoked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            check_hresult(_winrt_abi_type->add_Invoked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Invoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwipeItem, winrt::Microsoft::UI::Xaml::Controls::SwipeItemInvokedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Invoked_revoker>(this, Invoked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItem<D>::Invoked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Invoked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>**)this;
            _winrt_abi_type->remove_Invoked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemInvokedEventArgs<D>::SwipeControl() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SwipeControl(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SwipeControl(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::CommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::CommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemStatics<D>::BehaviorOnInvokedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BehaviorOnInvokedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_BehaviorOnInvokedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItems<D>::Mode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::SwipeMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>**)this;
            check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItems<D>::Mode(winrt::Microsoft::UI::Xaml::Controls::SwipeMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Mode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>**)this;
            check_hresult(_winrt_abi_type->put_Mode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SwipeItems{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISwipeItemsStatics<D>::ModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIcon<D>::Symbol() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Symbol value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Symbol(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>**)this;
            check_hresult(_winrt_abi_type->get_Symbol(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIcon<D>::Symbol(winrt::Microsoft::UI::Xaml::Controls::Symbol const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Symbol(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>**)this;
            check_hresult(_winrt_abi_type->put_Symbol(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconFactory<D>::CreateInstanceWithSymbol(winrt::Microsoft::UI::Xaml::Controls::Symbol const& symbol) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstanceWithSymbol(static_cast<int32_t>(symbol), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstanceWithSymbol(static_cast<int32_t>(symbol), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SymbolIcon{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconSource<D>::Symbol() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Symbol value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Symbol(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>**)this;
            check_hresult(_winrt_abi_type->get_Symbol(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconSource<D>::Symbol(winrt::Microsoft::UI::Xaml::Controls::Symbol const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Symbol(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>**)this;
            check_hresult(_winrt_abi_type->put_Symbol(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconSourceFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::SymbolIconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconSourceStatics<D>::SymbolProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SymbolProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics>**)this;
            check_hresult(_winrt_abi_type->get_SymbolProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ISymbolIconStatics<D>::SymbolProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SymbolProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics>**)this;
            check_hresult(_winrt_abi_type->get_SymbolProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabWidthMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabWidthMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabWidthMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabWidthMode(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabWidthMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabWidthMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CloseButtonOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TabViewCloseButtonOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CloseButtonOverlayMode(winrt::Microsoft::UI::Xaml::Controls::TabViewCloseButtonOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripHeader() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripHeader(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabStripHeader(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripHeader(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabStripHeader(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabStripHeader(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripHeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripHeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabStripHeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripHeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabStripHeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabStripHeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripFooter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripFooter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabStripFooter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripFooter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabStripFooter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabStripFooter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripFooterTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripFooterTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabStripFooterTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripFooterTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabStripFooterTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabStripFooterTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::IsAddTabButtonVisible() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAddTabButtonVisible(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_IsAddTabButtonVisible(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::IsAddTabButtonVisible(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsAddTabButtonVisible(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_IsAddTabButtonVisible(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AddTabButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_AddTabButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AddTabButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_AddTabButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabCloseRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabCloseRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabCloseRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabCloseRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabCloseRequested_revoker>(this, TabCloseRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabCloseRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabCloseRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabCloseRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDroppedOutside(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDroppedOutsideEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabDroppedOutside(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabDroppedOutside(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDroppedOutside(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDroppedOutsideEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabDroppedOutside_revoker>(this, TabDroppedOutside(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDroppedOutside(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabDroppedOutside(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabDroppedOutside(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_AddTabButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_AddTabButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, AddTabButtonClick_revoker>(this, AddTabButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AddTabButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_AddTabButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_AddTabButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemsChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::Collections::IVectorChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabItemsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabItemsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::Collections::IVectorChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabItemsChanged_revoker>(this, TabItemsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabItemsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabItemsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_TabItemTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabItemTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabItemTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_TabItemTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CanDragTabs() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragTabs(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_CanDragTabs(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CanDragTabs(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanDragTabs(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_CanDragTabs(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CanReorderTabs() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderTabs(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderTabs(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::CanReorderTabs(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanReorderTabs(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_CanReorderTabs(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AllowDropTabs() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowDropTabs(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_AllowDropTabs(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::AllowDropTabs(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AllowDropTabs(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_AllowDropTabs(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::ContainerFromItem(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::ContainerFromIndex(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->ContainerFromIndex(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragStartingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabDragStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabDragStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragStartingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabDragStarting_revoker>(this, TabDragStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabDragStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabDragStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabDragCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabDragCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabDragCompleted_revoker>(this, TabDragCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabDragCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabDragCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabDragCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDragOver(winrt::Microsoft::UI::Xaml::DragEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabStripDragOver(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabStripDragOver(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDragOver(auto_revoke_t, winrt::Microsoft::UI::Xaml::DragEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, TabStripDragOver_revoker>(this, TabStripDragOver(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDragOver(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabStripDragOver(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabStripDragOver(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDrop(winrt::Microsoft::UI::Xaml::DragEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabStripDrop(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            check_hresult(_winrt_abi_type->add_TabStripDrop(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDrop(auto_revoke_t, winrt::Microsoft::UI::Xaml::DragEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, TabStripDrop_revoker>(this, TabStripDrop(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView<D>::TabStripDrop(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabStripDrop(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView>**)this;
            _winrt_abi_type->remove_TabStripDrop(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::CanTearOutTabs() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanTearOutTabs(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->get_CanTearOutTabs(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::CanTearOutTabs(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanTearOutTabs(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->put_CanTearOutTabs(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutWindowRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutWindowRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabTearOutWindowRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->add_TabTearOutWindowRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutWindowRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutWindowRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabTearOutWindowRequested_revoker>(this, TabTearOutWindowRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutWindowRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabTearOutWindowRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            _winrt_abi_type->remove_TabTearOutWindowRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TabTearOutRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->add_TabTearOutRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TabTearOutRequested_revoker>(this, TabTearOutRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::TabTearOutRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TabTearOutRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            _winrt_abi_type->remove_TabTearOutRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropping(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ExternalTornOutTabsDropping(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->add_ExternalTornOutTabsDropping(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropping(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ExternalTornOutTabsDropping_revoker>(this, ExternalTornOutTabsDropping(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropping(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ExternalTornOutTabsDropping(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            _winrt_abi_type->remove_ExternalTornOutTabsDropping(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropped(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ExternalTornOutTabsDropped(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            check_hresult(_winrt_abi_type->add_ExternalTornOutTabsDropped(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ExternalTornOutTabsDropped_revoker>(this, ExternalTornOutTabsDropped(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabView2<D>::ExternalTornOutTabsDropped(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ExternalTornOutTabsDropped(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabView2>**)this;
            _winrt_abi_type->remove_ExternalTornOutTabsDropped(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppedEventArgs<D>::Items() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        return com_array<winrt::Windows::Foundation::IInspectable>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppedEventArgs<D>::Tabs() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        return com_array<winrt::Microsoft::UI::Xaml::UIElement>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppedEventArgs<D>::DropIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DropIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppingEventArgs<D>::Items() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        return com_array<winrt::Windows::Foundation::IInspectable>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppingEventArgs<D>::Tabs() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        return com_array<winrt::Microsoft::UI::Xaml::UIElement>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppingEventArgs<D>::DropIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DropIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppingEventArgs<D>::AllowDrop() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowDrop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AllowDrop(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewExternalTornOutTabsDroppingEventArgs<D>::AllowDrop(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AllowDrop(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_AllowDrop(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::IsClosable() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClosable(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->get_IsClosable(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::IsClosable(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsClosable(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->put_IsClosable(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::TabViewTemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabViewTemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->get_TabViewTemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::CloseRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabViewItem, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CloseRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            check_hresult(_winrt_abi_type->add_CloseRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::CloseRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabViewItem, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CloseRequested_revoker>(this, CloseRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItem<D>::CloseRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CloseRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>**)this;
            _winrt_abi_type->remove_CloseRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemStatics<D>::IsClosableProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsClosableProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsClosableProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemStatics<D>::TabViewTemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabViewTemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabViewTemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettings<D>::IconElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettings<D>::IconElement(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettings2<D>::TabGeometry() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabGeometry(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>**)this;
            check_hresult(_winrt_abi_type->get_TabGeometry(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Geometry{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettings2<D>::TabGeometry(winrt::Microsoft::UI::Xaml::Media::Geometry const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TabGeometry(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>**)this;
            check_hresult(_winrt_abi_type->put_TabGeometry(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettingsStatics<D>::IconElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewItemTemplateSettingsStatics2<D>::TabGeometryProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabGeometryProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2>**)this;
            check_hresult(_winrt_abi_type->get_TabGeometryProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabWidthModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabWidthModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabWidthModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabStripHeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripHeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabStripHeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabStripHeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripHeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabStripHeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabStripFooterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripFooterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabStripFooterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabStripFooterTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabStripFooterTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabStripFooterTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::IsAddTabButtonVisibleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsAddTabButtonVisibleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsAddTabButtonVisibleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::AddTabButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::AddTabButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_AddTabButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::TabItemTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TabItemTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TabItemTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::CloseButtonOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::CanDragTabsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragTabsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanDragTabsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::CanReorderTabsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderTabsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderTabsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::AllowDropTabsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowDropTabsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_AllowDropTabsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewStatics2<D>::CanTearOutTabsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanTearOutTabsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_CanTearOutTabsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabCloseRequestedEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabCloseRequestedEventArgs<D>::Tab() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragCompletedEventArgs<D>::DropResult() const
    {
        winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragCompletedEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragCompletedEventArgs<D>::Tab() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragStartingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragStartingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragStartingEventArgs<D>::Data() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        return winrt::Windows::ApplicationModel::DataTransfer::DataPackage{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragStartingEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDragStartingEventArgs<D>::Tab() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDroppedOutsideEventArgs<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabDroppedOutsideEventArgs<D>::Tab() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tab(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TabViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutRequestedEventArgs<D>::Items() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        return com_array<winrt::Windows::Foundation::IInspectable>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutRequestedEventArgs<D>::Tabs() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        return com_array<winrt::Microsoft::UI::Xaml::UIElement>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutRequestedEventArgs<D>::NewWindowId() const
    {
        winrt::Microsoft::UI::WindowId value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewWindowId(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewWindowId(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutWindowRequestedEventArgs<D>::Items() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value_impl_size, &value));
        }
        return com_array<winrt::Windows::Foundation::IInspectable>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutWindowRequestedEventArgs<D>::Tabs() const
    {
        uint32_t value_impl_size{};
        void** value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Tabs(&value_impl_size, &value));
        }
        return com_array<winrt::Microsoft::UI::Xaml::UIElement>{ value, value_impl_size, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutWindowRequestedEventArgs<D>::NewWindowId() const
    {
        winrt::Microsoft::UI::WindowId value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewWindowId(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewWindowId(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITabViewTabTearOutWindowRequestedEventArgs<D>::NewWindowId(winrt::Microsoft::UI::WindowId const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_NewWindowId(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_NewWindowId(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Title() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_Title(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Title(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_Title(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Subtitle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Subtitle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_Subtitle(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Subtitle(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IsOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Target() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Target(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_Target(&value));
        }
        return winrt::Microsoft::UI::Xaml::FrameworkElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Target(winrt::Microsoft::UI::Xaml::FrameworkElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Target(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_Target(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::TailVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TeachingTipTailVisibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TailVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_TailVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::TailVisibility(winrt::Microsoft::UI::Xaml::Controls::TeachingTipTailVisibility const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TailVisibility(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_TailVisibility(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonContent(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonContent(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ActionButtonContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_ActionButtonContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ActionButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_ActionButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ActionButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_ActionButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ActionButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_ActionButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonContent(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonContent(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonCommand() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommand(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::ICommand{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonCommand(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonCommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameter(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonCommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_CloseButtonCommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::PlacementMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_PlacementMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::PlacementMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlacementMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_PlacementMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ShouldConstrainToRootBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ShouldConstrainToRootBounds(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IsLightDismissEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IsLightDismissEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsLightDismissEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_IsLightDismissEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::PreferredPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TeachingTipPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreferredPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_PreferredPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::PreferredPlacement(winrt::Microsoft::UI::Xaml::Controls::TeachingTipPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreferredPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_PreferredPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::HeroContentPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TeachingTipHeroContentPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeroContentPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_HeroContentPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::HeroContentPlacement(winrt::Microsoft::UI::Xaml::Controls::TeachingTipHeroContentPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeroContentPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_HeroContentPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::HeroContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeroContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_HeroContent(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::HeroContent(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeroContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_HeroContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IconSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_IconSource(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconSource{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::IconSource(winrt::Microsoft::UI::Xaml::Controls::IconSource const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->put_IconSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TeachingTipTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ActionButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->add_ActionButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ActionButtonClick_revoker>(this, ActionButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::ActionButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ActionButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            _winrt_abi_type->remove_ActionButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonClick(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->add_CloseButtonClick(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonClick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, CloseButtonClick_revoker>(this, CloseButtonClick(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::CloseButtonClick(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            _winrt_abi_type->remove_CloseButtonClick(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closing_revoker>(this, Closing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTip<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipClosedEventArgs<D>::Reason() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TeachingTipCloseReason value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipClosingEventArgs<D>::Reason() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TeachingTipCloseReason value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipClosingEventArgs<D>::GetDeferral() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->GetDeferral(&result));
        }
        return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TeachingTip{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::TargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_TargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::TailVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TailVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_TailVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::SubtitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SubtitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_SubtitleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::ActionButtonContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::ActionButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::ActionButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::ActionButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_ActionButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::CloseButtonContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::CloseButtonStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::CloseButtonCommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::CloseButtonCommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_CloseButtonCommandParameterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::PlacementMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::ShouldConstrainToRootBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::IsLightDismissEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::PreferredPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreferredPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreferredPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::HeroContentPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeroContentPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeroContentPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::HeroContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeroContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeroContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::IconSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::TopRightHighlightMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopRightHighlightMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_TopRightHighlightMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::TopRightHighlightMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopRightHighlightMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_TopRightHighlightMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::TopLeftHighlightMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopLeftHighlightMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_TopLeftHighlightMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::TopLeftHighlightMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TopLeftHighlightMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_TopLeftHighlightMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::IconElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IconElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::IconElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettings<D>::IconElement(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->put_IconElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TeachingTipTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettingsStatics<D>::TopRightHighlightMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopRightHighlightMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopRightHighlightMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettingsStatics<D>::TopLeftHighlightMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TopLeftHighlightMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_TopLeftHighlightMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITeachingTipTemplateSettingsStatics<D>::IconElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontFamily() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontFamily(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::FontFamily{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontFamily(winrt::Microsoft::UI::Xaml::Media::FontFamily const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontFamily(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontWeight() const
    {
        winrt::Windows::UI::Text::FontWeight value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontWeight(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontWeight(winrt::Windows::UI::Text::FontWeight const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontWeight(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontStyle() const
    {
        winrt::Windows::UI::Text::FontStyle value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontStyle(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontStyle(winrt::Windows::UI::Text::FontStyle const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontStyle(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontStretch() const
    {
        winrt::Windows::UI::Text::FontStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_FontStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::FontStretch(winrt::Windows::UI::Text::FontStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_FontStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::CharacterSpacing() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::CharacterSpacing(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_CharacterSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Foreground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Foreground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Foreground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_Foreground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextWrapping() const
    {
        winrt::Microsoft::UI::Xaml::TextWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextWrapping(winrt::Microsoft::UI::Xaml::TextWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextTrimming() const
    {
        winrt::Microsoft::UI::Xaml::TextTrimming value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextTrimming(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextTrimming(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextTrimming(winrt::Microsoft::UI::Xaml::TextTrimming const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextTrimming(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextTrimming(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Inlines() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Inlines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Inlines(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::InlineCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Padding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_Padding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Padding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_Padding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::LineHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_LineHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::LineHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_LineHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::LineStackingStrategy() const
    {
        winrt::Microsoft::UI::Xaml::LineStackingStrategy value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategy(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::LineStackingStrategy(winrt::Microsoft::UI::Xaml::LineStackingStrategy const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_LineStackingStrategy(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextSelectionEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextSelectionEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextSelectionEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsTextSelectionEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectedText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::ContentStart() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_ContentStart(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::ContentEnd() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_ContentEnd(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionStart() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionEnd() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionEnd(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionEnd(&value));
        }
        return winrt::Microsoft::UI::Xaml::Documents::TextPointer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::BaselineOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_BaselineOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::MaxLines() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_MaxLines(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::MaxLines(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_MaxLines(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextLineBounds() const
    {
        winrt::Microsoft::UI::Xaml::TextLineBounds value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBounds(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextLineBounds(winrt::Microsoft::UI::Xaml::TextLineBounds const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextLineBounds(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::OpticalMarginAlignment() const
    {
        winrt::Microsoft::UI::Xaml::OpticalMarginAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::OpticalMarginAlignment(winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_OpticalMarginAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsColorFontEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsColorFontEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextScaleFactorEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextScaleFactorEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_IsTextScaleFactorEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextDecorations() const
    {
        winrt::Windows::UI::Text::TextDecorations value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextDecorations(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextDecorations(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextDecorations(winrt::Windows::UI::Text::TextDecorations const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextDecorations(static_cast<uint32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_TextDecorations(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextTrimmed() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmed(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::HorizontalTextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::HorizontalTextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::TextHighlighters() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextHighlighters(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_TextHighlighters(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Documents::TextHighlighter>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::ContextMenuOpening(winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::ContextMenuOpening(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ContextMenuOpening_revoker>(this, ContextMenuOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::ContextMenuOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextTrimmedChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->add_IsTextTrimmedChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextTrimmedChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, IsTextTrimmedChanged_revoker>(this, IsTextTrimmedChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::IsTextTrimmedChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            _winrt_abi_type->remove_IsTextTrimmedChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::Select(winrt::Microsoft::UI::Xaml::Documents::TextPointer const& start, winrt::Microsoft::UI::Xaml::Documents::TextPointer const& end) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Select(*(void**)(&start), *(void**)(&end)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->Select(*(void**)(&start), *(void**)(&end)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::GetAlphaMask() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAlphaMask(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->GetAlphaMask(&result));
        }
        return winrt::Microsoft::UI::Composition::CompositionBrush{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlock<D>::CopySelectionToClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlock, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlock>**)this;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::FontSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::FontFamilyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontFamilyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::FontWeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontWeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::FontStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::FontStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_FontStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::CharacterSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::ForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_ForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextWrappingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextTrimmingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextTrimmingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextTrimmingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::PaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_PaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::LineHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::LineStackingStrategyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_LineStackingStrategyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::IsTextSelectionEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextSelectionEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::SelectedTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::MaxLinesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLinesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextLineBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextLineBoundsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::OpticalMarginAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_OpticalMarginAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::IsColorFontEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::IsTextScaleFactorEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextScaleFactorEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::TextDecorationsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextDecorationsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextDecorationsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::IsTextTrimmedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextTrimmedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::HorizontalTextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBlockStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Text() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_Text(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Text(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_Text(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectedText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectedText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectedText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectedText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionLength(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionStart() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionStart(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionStart(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionStart(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::MaxLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_MaxLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::MaxLength(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_MaxLength(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsReadOnly() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnly(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsReadOnly(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_IsReadOnly(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::AcceptsReturn() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsReturn(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsReturn(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::AcceptsReturn(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AcceptsReturn(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_AcceptsReturn(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_TextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextWrapping() const
    {
        winrt::Microsoft::UI::Xaml::TextWrapping value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_TextWrapping(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextWrapping(winrt::Microsoft::UI::Xaml::TextWrapping const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_TextWrapping(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsSpellCheckEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsSpellCheckEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSpellCheckEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_IsSpellCheckEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsTextPredictionEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsTextPredictionEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsTextPredictionEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_IsTextPredictionEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::InputScope() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_InputScope(&value));
        }
        return winrt::Microsoft::UI::Xaml::Input::InputScope{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::InputScope(winrt::Microsoft::UI::Xaml::Input::InputScope const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_InputScope(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PlaceholderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PlaceholderText(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderText(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionHighlightColor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColor(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionHighlightColor(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColor(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PreventKeyboardDisplayOnProgrammaticFocus() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocus(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PreventKeyboardDisplayOnProgrammaticFocus(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_PreventKeyboardDisplayOnProgrammaticFocus(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsColorFontEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::IsColorFontEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_IsColorFontEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionHighlightColorWhenNotFocused() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocused(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocused(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionHighlightColorWhenNotFocused(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColorWhenNotFocused(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionHighlightColorWhenNotFocused(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::HorizontalTextAlignment() const
    {
        winrt::Microsoft::UI::Xaml::TextAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::HorizontalTextAlignment(winrt::Microsoft::UI::Xaml::TextAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalTextAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CharacterCasing() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CharacterCasing value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterCasing(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_CharacterCasing(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CharacterCasing(winrt::Microsoft::UI::Xaml::Controls::CharacterCasing const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CharacterCasing(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_CharacterCasing(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PlaceholderForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PlaceholderForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CanPasteClipboardContent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CanUndo() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanUndo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_CanUndo(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CanRedo() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanRedo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_CanRedo(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionFlyout(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_SelectionFlyout(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::ProofingMenuFlyout() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyout(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyout(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Description() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_Description(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Description(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_Description(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanged(winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_TextChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, TextChanged_revoker>(this, TextChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_TextChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanged(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::ContextMenuOpening(winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_ContextMenuOpening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::ContextMenuOpening(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ContextMenuOpening_revoker>(this, ContextMenuOpening(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::ContextMenuOpening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_ContextMenuOpening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Paste(winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_Paste(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Paste(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Paste_revoker>(this, Paste(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Paste(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_Paste(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionStarted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionStarted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionStarted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionStarted_revoker>(this, TextCompositionStarted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionStarted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionStarted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_TextCompositionStarted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionChanged_revoker>(this, TextCompositionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_TextCompositionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionEnded(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextCompositionEnded(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_TextCompositionEnded(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextCompositionEnded_revoker>(this, TextCompositionEnded(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextCompositionEnded(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextCompositionEnded(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_TextCompositionEnded(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CopyingToClipboard(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CopyingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_CopyingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CopyingToClipboard(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CopyingToClipboard_revoker>(this, CopyingToClipboard(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CopyingToClipboard(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CopyingToClipboard(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_CopyingToClipboard(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CuttingToClipboard(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CuttingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_CuttingToClipboard(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CuttingToClipboard(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CuttingToClipboard_revoker>(this, CuttingToClipboard(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CuttingToClipboard(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CuttingToClipboard(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_CuttingToClipboard(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::BeforeTextChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxBeforeTextChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_BeforeTextChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_BeforeTextChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::BeforeTextChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxBeforeTextChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, BeforeTextChanging_revoker>(this, BeforeTextChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::BeforeTextChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_BeforeTextChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_BeforeTextChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxSelectionChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxSelectionChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanging_revoker>(this, SelectionChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectionChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_SelectionChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Select(int32_t start, int32_t length) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Select(start, length));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->Select(start, length));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::GetRectFromCharacterIndex(int32_t charIndex, bool trailingEdge) const
    {
        winrt::Windows::Foundation::Rect result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRectFromCharacterIndex(charIndex, trailingEdge, put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->GetRectFromCharacterIndex(charIndex, trailingEdge, put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::GetLinguisticAlternativesAsync() const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLinguisticAlternativesAsync(&operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->GetLinguisticAlternativesAsync(&operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<hstring>>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Undo() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Undo());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->Undo());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::Redo() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Redo());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->Redo());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::PasteFromClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PasteFromClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->PasteFromClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CopySelectionToClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->CopySelectionToClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CutSelectionToClipboard() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CutSelectionToClipboard());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->CutSelectionToClipboard());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::ClearUndoRedoHistory() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ClearUndoRedoHistory());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->ClearUndoRedoHistory());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextReadingOrder() const
    {
        winrt::Microsoft::UI::Xaml::TextReadingOrder value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrder(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextReadingOrder(winrt::Microsoft::UI::Xaml::TextReadingOrder const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_TextReadingOrder(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::DesiredCandidateWindowAlignment() const
    {
        winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::DesiredCandidateWindowAlignment(winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DesiredCandidateWindowAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->put_DesiredCandidateWindowAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CandidateWindowBoundsChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CandidateWindowBoundsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_CandidateWindowBoundsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CandidateWindowBoundsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CandidateWindowBoundsChanged_revoker>(this, CandidateWindowBoundsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::CandidateWindowBoundsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CandidateWindowBoundsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_CandidateWindowBoundsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanging(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TextChanging(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            check_hresult(_winrt_abi_type->add_TextChanging(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TextChanging_revoker>(this, TextChanging(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBox<D>::TextChanging(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TextChanging(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBox>**)this;
            _winrt_abi_type->remove_TextChanging(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxBeforeTextChangingEventArgs<D>::NewText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxBeforeTextChangingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxBeforeTextChangingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TextBox{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxSelectionChangingEventArgs<D>::SelectionStart() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectionStart(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxSelectionChangingEventArgs<D>::SelectionLength() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_SelectionLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxSelectionChangingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxSelectionChangingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::TextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::MaxLengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaxLengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::IsReadOnlyProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsReadOnlyProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::AcceptsReturnProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AcceptsReturnProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_AcceptsReturnProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::TextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::TextWrappingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextWrappingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::IsSpellCheckEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSpellCheckEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::IsTextPredictionEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsTextPredictionEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::InputScopeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_InputScopeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::PlaceholderTextProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderTextProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::SelectionHighlightColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::PreventKeyboardDisplayOnProgrammaticFocusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::IsColorFontEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsColorFontEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::SelectionHighlightColorWhenNotFocusedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocusedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionHighlightColorWhenNotFocusedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::HorizontalTextAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalTextAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::CharacterCasingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CharacterCasingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CharacterCasingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::PlaceholderForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::CanPasteClipboardContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanPasteClipboardContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::CanUndoProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanUndoProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanUndoProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::CanRedoProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanRedoProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_CanRedoProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::SelectionFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::ProofingMenuFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_ProofingMenuFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::DescriptionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DescriptionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::DesiredCandidateWindowAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_DesiredCandidateWindowAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxStatics<D>::TextReadingOrderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>**)this;
            check_hresult(_winrt_abi_type->get_TextReadingOrderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextBoxTextChangingEventArgs<D>::IsContentChanging() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_IsContentChanging(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCommandBarFlyoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TextCommandBarFlyout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionChangedEventArgs<D>::StartIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionChangedEventArgs<D>::Length() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionEndedEventArgs<D>::StartIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionEndedEventArgs<D>::Length() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionStartedEventArgs<D>::StartIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_StartIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextCompositionStartedEventArgs<D>::Length() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Length(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlCopyingToClipboardEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlCopyingToClipboardEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlCuttingToClipboardEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlCuttingToClipboardEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlPasteEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITextControlPasteEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickedEventArgs<D>::OldTime() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldTime(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldTime(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickedEventArgs<D>::NewTime() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewTime(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewTime(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::ClockIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClockIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_ClockIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::ClockIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ClockIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_ClockIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::MinuteIncrement() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinuteIncrement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_MinuteIncrement(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::MinuteIncrement(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinuteIncrement(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_MinuteIncrement(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::Time() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Time(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_Time(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::Time(winrt::Windows::Foundation::TimeSpan const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Time(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_Time(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::SelectedTime() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedTime(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->get_SelectedTime(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::SelectedTime(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedTime(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->put_SelectedTime(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::TimeChanged(winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerValueChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TimeChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->add_TimeChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::TimeChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerValueChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TimeChanged_revoker>(this, TimeChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::TimeChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TimeChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            _winrt_abi_type->remove_TimeChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::SelectedTimeChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePicker, winrt::Microsoft::UI::Xaml::Controls::TimePickerSelectedValueChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectedTimeChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            check_hresult(_winrt_abi_type->add_SelectedTimeChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::SelectedTimeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePicker, winrt::Microsoft::UI::Xaml::Controls::TimePickerSelectedValueChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectedTimeChanged_revoker>(this, SelectedTimeChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePicker<D>::SelectedTimeChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePicker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectedTimeChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePicker>**)this;
            _winrt_abi_type->remove_SelectedTimeChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TimePicker{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::ClockIdentifier() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClockIdentifier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_ClockIdentifier(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::ClockIdentifier(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ClockIdentifier(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_ClockIdentifier(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::Time() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Time(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_Time(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::Time(winrt::Windows::Foundation::TimeSpan const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Time(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_Time(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::MinuteIncrement() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinuteIncrement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->get_MinuteIncrement(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::MinuteIncrement(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinuteIncrement(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->put_MinuteIncrement(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::TimePicked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::TimePickedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_TimePicked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->add_TimePicked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::TimePicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::TimePickedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, TimePicked_revoker>(this, TimePicked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::TimePicked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            _winrt_abi_type->remove_TimePicked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            _winrt_abi_type->remove_TimePicked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyout<D>::ShowAtAsync(winrt::Microsoft::UI::Xaml::FrameworkElement const& target) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>**)this;
            check_hresult(_winrt_abi_type->ShowAtAsync(*(void**)(&target), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutPresenter<D>::IsDefaultShadowEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutPresenter<D>::IsDefaultShadowEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IsDefaultShadowEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutPresenterStatics<D>::IsDefaultShadowEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDefaultShadowEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutStatics<D>::ClockIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClockIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ClockIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutStatics<D>::TimeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TimeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_TimeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerFlyoutStatics<D>::MinuteIncrementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinuteIncrementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinuteIncrementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerSelectedValueChangedEventArgs<D>::OldTime() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldTime(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldTime(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerSelectedValueChangedEventArgs<D>::NewTime() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewTime(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewTime(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::ClockIdentifierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClockIdentifierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_ClockIdentifierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::MinuteIncrementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinuteIncrementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinuteIncrementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::TimeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TimeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_TimeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerStatics<D>::SelectedTimeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedTimeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedTimeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerValueChangedEventArgs<D>::OldTime() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldTime(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldTime(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITimePickerValueChangedEventArgs<D>::NewTime() const
    {
        winrt::Windows::Foundation::TimeSpan value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewTime(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewTime(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleMenuFlyoutItem<D>::IsChecked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleMenuFlyoutItem<D>::IsChecked(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>**)this;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleMenuFlyoutItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ToggleMenuFlyoutItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleMenuFlyoutItemStatics<D>::IsCheckedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButton<D>::IsChecked() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)this;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButton<D>::IsChecked(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)this;
            check_hresult(_winrt_abi_type->put_IsChecked(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButton<D>::IsCheckedChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton, winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButtonIsCheckedChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsCheckedChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)this;
            check_hresult(_winrt_abi_type->add_IsCheckedChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButton<D>::IsCheckedChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton, winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButtonIsCheckedChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, IsCheckedChanged_revoker>(this, IsCheckedChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButton<D>::IsCheckedChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsCheckedChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>**)this;
            _winrt_abi_type->remove_IsCheckedChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButtonFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSplitButtonStatics<D>::IsCheckedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::IsOn() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOn(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_IsOn(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::IsOn(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOn(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_IsOn(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::Header() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_Header(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::Header(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_Header(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::HeaderTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::HeaderTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_HeaderTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OnContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OnContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_OnContent(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OnContent(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OnContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_OnContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OnContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OnContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_OnContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OnContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OnContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_OnContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OffContent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_OffContent(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OffContent(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OffContent(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_OffContent(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OffContentTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffContentTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_OffContentTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::OffContentTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OffContentTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->put_OffContentTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::Toggled(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Toggled(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            check_hresult(_winrt_abi_type->add_Toggled(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::Toggled(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Toggled_revoker>(this, Toggled(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitch<D>::Toggled(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Toggled(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>**)this;
            _winrt_abi_type->remove_Toggled(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchOverrides<D>::OnToggled() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnToggled());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)this;
            check_hresult(_winrt_abi_type->OnToggled());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchOverrides<D>::OnOnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnOnContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)this;
            check_hresult(_winrt_abi_type->OnOnContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchOverrides<D>::OnOffContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnOffContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)this;
            check_hresult(_winrt_abi_type->OnOffContentChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchOverrides<D>::OnHeaderChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnHeaderChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>**)this;
            check_hresult(_winrt_abi_type->OnHeaderChanged(*(void**)(&oldContent), *(void**)(&newContent)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::IsOnProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOnProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOnProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::HeaderProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::HeaderTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_HeaderTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::OnContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OnContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_OnContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::OnContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OnContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_OnContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::OffContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_OffContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToggleSwitchStatics<D>::OffContentTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffContentTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>**)this;
            check_hresult(_winrt_abi_type->get_OffContentTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::HorizontalOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::IsOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Placement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Placement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_Placement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Placement(winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Placement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_Placement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::PlacementTarget() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementTarget(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_PlacementTarget(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::PlacementTarget(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlacementTarget(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_PlacementTarget(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::PlacementRect() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementRect(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_PlacementRect(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::PlacementRect(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlacementRect(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_PlacementRect(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::VerticalOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->put_VerticalOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Closed(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Closed(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Closed_revoker>(this, Closed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Opened(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Opened(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Opened_revoker>(this, Opened(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTip<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTip, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTip>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ToolTip{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::PlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::GetPlacement(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPlacement(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->GetPlacement(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::SetPlacement(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetPlacement(*(void**)(&element), static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->SetPlacement(*(void**)(&element), static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::PlacementTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::GetPlacementTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetPlacementTarget(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->GetPlacementTarget(*(void**)(&element), &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::SetPlacementTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetPlacementTarget(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->SetPlacementTarget(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::ToolTipProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ToolTipProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->get_ToolTipProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::GetToolTip(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetToolTip(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->GetToolTip(*(void**)(&element), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipServiceStatics<D>::SetToolTip(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetToolTip(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>**)this;
            check_hresult(_winrt_abi_type->SetToolTip(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::HorizontalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::PlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::PlacementTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementTargetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::PlacementRectProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementRectProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlacementRectProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IToolTipStatics<D>::VerticalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::RootNodes() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RootNodes(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->get_RootNodes(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::SelectionMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->get_SelectionMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::SelectionMode(winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->put_SelectionMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::SelectedNodes() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedNodes(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->get_SelectedNodes(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Expand(winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Expand(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->Expand(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Collapse(winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Collapse(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->Collapse(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::SelectAll() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SelectAll());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->SelectAll());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewItemInvokedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::ItemInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewItemInvokedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ItemInvoked_revoker>(this, ItemInvoked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::ItemInvoked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Expanding(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewExpandingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->add_Expanding(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Expanding(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewExpandingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Expanding_revoker>(this, Expanding(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Expanding(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            _winrt_abi_type->remove_Expanding(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Collapsed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewCollapsedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            check_hresult(_winrt_abi_type->add_Collapsed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Collapsed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewCollapsedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Collapsed_revoker>(this, Collapsed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView<D>::Collapsed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView>**)this;
            _winrt_abi_type->remove_Collapsed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::NodeFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->NodeFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->NodeFromContainer(*(void**)(&container), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ContainerFromNode(winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const& node) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromNode(*(void**)(&node), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->ContainerFromNode(*(void**)(&node), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemFromContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->ItemFromContainer(*(void**)(&container), &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ContainerFromItem(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->ContainerFromItem(*(void**)(&item), &result));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::CanDragItems() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_CanDragItems(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::CanDragItems(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanDragItems(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_CanDragItems(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::CanReorderItems() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderItems(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::CanReorderItems(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanReorderItems(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_CanReorderItems(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        return winrt::Microsoft::UI::Xaml::DataTemplate{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemTemplateSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemTemplateSelector(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemTemplateSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplateSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerStyle() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyle(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyle(&value));
        }
        return winrt::Microsoft::UI::Xaml::Style{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerStyle(winrt::Microsoft::UI::Xaml::Style const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerStyle(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerStyle(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerStyleSelector() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelector(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelector(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::StyleSelector{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerStyleSelector(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerStyleSelector(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerStyleSelector(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitions(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemContainerTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemContainerTransitions(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemContainerTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsStartingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragItemsStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->add_DragItemsStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsStartingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DragItemsStarting_revoker>(this, DragItemsStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragItemsStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            _winrt_abi_type->remove_DragItemsStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragItemsCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->add_DragItemsCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, DragItemsCompleted_revoker>(this, DragItemsCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::DragItemsCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragItemsCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            _winrt_abi_type->remove_DragItemsCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::SelectedNode() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedNode(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_SelectedNode(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::SelectedNode(winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedNode(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_SelectedNode(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView2<D>::SelectedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView2>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView3<D>::SelectionChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionChangedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView3>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView3<D>::SelectionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionChangedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, SelectionChanged_revoker>(this, SelectionChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeView3<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeView3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView3>**)&_winrt_casted_result;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeView3>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewCollapsedEventArgs<D>::Node() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Node(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Node(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewCollapsedEventArgs2<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsCompletedEventArgs<D>::DropResult() const
    {
        winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_DropResult(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsCompletedEventArgs<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsCompletedEventArgs2<D>::NewParentItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewParentItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_NewParentItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsStartingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsStartingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsStartingEventArgs<D>::Data() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Data(&value));
        }
        return winrt::Windows::ApplicationModel::DataTransfer::DataPackage{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewDragItemsStartingEventArgs<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewExpandingEventArgs<D>::Node() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Node(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Node(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewExpandingEventArgs2<D>::Item() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2>**)this;
            check_hresult(_winrt_abi_type->get_Item(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphOpacity() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphOpacity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_GlyphOpacity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphOpacity(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GlyphOpacity(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_GlyphOpacity(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_GlyphBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GlyphBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_GlyphBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::ExpandedGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::ExpandedGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ExpandedGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_ExpandedGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::CollapsedGlyph() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedGlyph(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedGlyph(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::CollapsedGlyph(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CollapsedGlyph(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_CollapsedGlyph(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_GlyphSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::GlyphSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GlyphSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_GlyphSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::IsExpanded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::IsExpanded(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem<D>::TreeViewItemTemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TreeViewItemTemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>**)this;
            check_hresult(_winrt_abi_type->get_TreeViewItemTemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem2<D>::HasUnrealizedChildren() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem2<D>::HasUnrealizedChildren(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem2<D>::ItemsSource() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSource(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItem2<D>::ItemsSource(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>**)this;
            check_hresult(_winrt_abi_type->put_ItemsSource(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemInvokedEventArgs<D>::InvokedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InvokedItem(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemInvokedEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemInvokedEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::GlyphOpacityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphOpacityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphOpacityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::GlyphBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::ExpandedGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::CollapsedGlyphProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::GlyphSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GlyphSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_GlyphSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::IsExpandedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics<D>::TreeViewItemTemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TreeViewItemTemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>**)this;
            check_hresult(_winrt_abi_type->get_TreeViewItemTemplateSettingsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics2<D>::HasUnrealizedChildrenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildrenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildrenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemStatics2<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettings<D>::ExpandedGlyphVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettings<D>::CollapsedGlyphVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettings<D>::Indentation() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Indentation(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_Indentation(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettings<D>::DragItemsCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettingsFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewItemTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettingsStatics<D>::ExpandedGlyphVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedGlyphVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettingsStatics<D>::CollapsedGlyphVisibilityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphVisibilityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_CollapsedGlyphVisibilityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettingsStatics<D>::IndentationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IndentationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IndentationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewItemTemplateSettingsStatics<D>::DragItemsCountProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragItemsCountProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragItemsCountProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewListFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewList{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::Content(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::Parent() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Parent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_Parent(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::IsExpanded() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_IsExpanded(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::IsExpanded(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->put_IsExpanded(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::HasChildren() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasChildren(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_HasChildren(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::Depth() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Depth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_Depth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::HasUnrealizedChildren() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_HasUnrealizedChildren(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::HasUnrealizedChildren(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->put_HasUnrealizedChildren(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNode<D>::Children() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>**)this;
            check_hresult(_winrt_abi_type->get_Children(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNodeFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TreeViewNode{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNodeStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNodeStatics<D>::DepthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DepthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)this;
            check_hresult(_winrt_abi_type->get_DepthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNodeStatics<D>::IsExpandedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsExpandedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewNodeStatics<D>::HasChildrenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasChildrenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>**)this;
            check_hresult(_winrt_abi_type->get_HasChildrenProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewSelectionChangedEventArgs<D>::AddedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_AddedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewSelectionChangedEventArgs<D>::RemovedItems() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_RemovedItems(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics<D>::SelectionModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::CanDragItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanDragItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_CanDragItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::CanReorderItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanReorderItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_CanReorderItemsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemTemplateSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemTemplateSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemContainerStyleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemContainerStyleSelectorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelectorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerStyleSelectorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemContainerTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerTransitionsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITreeViewStatics2<D>::ItemsSourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>**)this;
            check_hresult(_winrt_abi_type->get_ItemsSourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane1() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane1(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_Pane1(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane1(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Pane1(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_Pane1(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane2() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane2(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_Pane2(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane2(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Pane2(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_Pane2(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane1Length() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane1Length(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_Pane1Length(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane1Length(winrt::Microsoft::UI::Xaml::GridLength const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Pane1Length(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_Pane1Length(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane2Length() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane2Length(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_Pane2Length(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Pane2Length(winrt::Microsoft::UI::Xaml::GridLength const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Pane2Length(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_Pane2Length(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::PanePriority() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanePriority(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_PanePriority(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::PanePriority(winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PanePriority(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_PanePriority(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::Mode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::WideModeConfiguration() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WideModeConfiguration(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_WideModeConfiguration(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::WideModeConfiguration(winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_WideModeConfiguration(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_WideModeConfiguration(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::TallModeConfiguration() const
    {
        winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TallModeConfiguration(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_TallModeConfiguration(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::TallModeConfiguration(winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_TallModeConfiguration(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_TallModeConfiguration(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::MinWideModeWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinWideModeWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_MinWideModeWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::MinWideModeWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinWideModeWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_MinWideModeWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::MinTallModeHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinTallModeHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->get_MinTallModeHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::MinTallModeHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinTallModeHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->put_MinTallModeHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::ModeChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TwoPaneView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ModeChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            check_hresult(_winrt_abi_type->add_ModeChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::ModeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TwoPaneView, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ModeChanged_revoker>(this, ModeChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneView<D>::ModeChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ModeChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>**)this;
            _winrt_abi_type->remove_ModeChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::TwoPaneView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::Pane1Property() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane1Property(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_Pane1Property(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::Pane2Property() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane2Property(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_Pane2Property(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::Pane1LengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane1LengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_Pane1LengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::Pane2LengthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Pane2LengthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_Pane2LengthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::PanePriorityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanePriorityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_PanePriorityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::ModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_ModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::WideModeConfigurationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WideModeConfigurationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_WideModeConfigurationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::TallModeConfigurationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TallModeConfigurationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_TallModeConfigurationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::MinWideModeWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinWideModeWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinWideModeWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_ITwoPaneViewStatics<D>::MinTallModeHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinTallModeHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinTallModeHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUIElementCollection<D>::Move(uint32_t oldIndex, uint32_t newIndex) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Move(oldIndex, newIndex));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection>**)this;
            check_hresult(_winrt_abi_type->Move(oldIndex, newIndex));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinItemWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MinItemWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinItemWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinItemWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MinItemWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinItemHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MinItemHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinItemHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinItemHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MinItemHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinRowSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinRowSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MinRowSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinRowSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinRowSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MinRowSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinColumnSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinColumnSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MinColumnSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MinColumnSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinColumnSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MinColumnSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::ItemsJustification() const
    {
        winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsJustification(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_ItemsJustification(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::ItemsJustification(winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsJustification(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_ItemsJustification(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::ItemsStretch() const
    {
        winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsStretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_ItemsStretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::ItemsStretch(winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemsStretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_ItemsStretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MaximumRowsOrColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayout<D>::MaximumRowsOrColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::UniformGridLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::MinItemWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinItemWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::MinItemHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinItemHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinItemHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::MinRowSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinRowSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinRowSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::MinColumnSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinColumnSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MinColumnSpacingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::ItemsJustificationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsJustificationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsJustificationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::ItemsStretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsStretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemsStretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUniformGridLayoutStatics<D>::MaximumRowsOrColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUserControl<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUserControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUserControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControl>**)this;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUserControl<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUserControl>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUserControl, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControl>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControl>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUserControlFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::UserControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IUserControlStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::ItemHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::ItemHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::ItemWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::ItemWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::HorizontalChildrenAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::HorizontalChildrenAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalChildrenAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalChildrenAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::VerticalChildrenAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::VerticalChildrenAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalChildrenAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_VerticalChildrenAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::MaximumRowsOrColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGrid<D>::MaximumRowsOrColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::ItemHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::ItemWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::HorizontalChildrenAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::VerticalChildrenAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::MaximumRowsOrColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::RowSpanProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpanProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_RowSpanProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::GetRowSpan(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRowSpan(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetRowSpan(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::SetRowSpan(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetRowSpan(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetRowSpan(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::ColumnSpanProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpanProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColumnSpanProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::GetColumnSpan(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetColumnSpan(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->GetColumnSpan(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVariableSizedWrapGridStatics<D>::SetColumnSpan(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetColumnSpan(*(void**)(&element), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->SetColumnSpan(*(void**)(&element), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::Child() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::Child(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::Stretch() const
    {
        winrt::Microsoft::UI::Xaml::Media::Stretch value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->get_Stretch(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::Stretch(winrt::Microsoft::UI::Xaml::Media::Stretch const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->put_Stretch(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::StretchDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::StretchDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->get_StretchDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewbox<D>::StretchDirection(winrt::Microsoft::UI::Xaml::Controls::StretchDirection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewbox, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_StretchDirection(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewbox>**)this;
            check_hresult(_winrt_abi_type->put_StretchDirection(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewboxStatics<D>::StretchProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IViewboxStatics<D>::StretchDirectionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_StretchDirectionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>**)this;
            check_hresult(_winrt_abi_type->get_StretchDirectionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::ItemCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_ItemCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::GetItemAt(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetItemAt(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->GetItemAt(index, &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::RealizationRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RealizationRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_RealizationRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::GetOrCreateElementAt(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetOrCreateElementAt(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->GetOrCreateElementAt(index, &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::GetOrCreateElementAt(int32_t index, winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const& options) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetOrCreateElementAt2(index, static_cast<uint32_t>(options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->GetOrCreateElementAt2(index, static_cast<uint32_t>(options), &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::RecycleElement(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RecycleElement(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->RecycleElement(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::RecommendedAnchorIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RecommendedAnchorIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_RecommendedAnchorIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::LayoutOrigin() const
    {
        winrt::Windows::Foundation::Point value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutOrigin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->get_LayoutOrigin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext<D>::LayoutOrigin(winrt::Windows::Foundation::Point const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LayoutOrigin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>**)this;
            check_hresult(_winrt_abi_type->put_LayoutOrigin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContext2<D>::VisibleRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VisibleRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2>**)this;
            check_hresult(_winrt_abi_type->get_VisibleRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::ItemCountCore() const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ItemCountCore(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->ItemCountCore(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::GetItemAtCore(int32_t index) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetItemAtCore(index, &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->GetItemAtCore(index, &result));
        }
        return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::RealizationRectCore() const
    {
        winrt::Windows::Foundation::Rect result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RealizationRectCore(put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->RealizationRectCore(put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::GetOrCreateElementAtCore(int32_t index, winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const& options) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetOrCreateElementAtCore(index, static_cast<uint32_t>(options), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->GetOrCreateElementAtCore(index, static_cast<uint32_t>(options), &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::RecycleElementCore(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RecycleElementCore(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->RecycleElementCore(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::RecommendedAnchorIndexCore() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RecommendedAnchorIndexCore(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->get_RecommendedAnchorIndexCore(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::LayoutOriginCore() const
    {
        winrt::Windows::Foundation::Point value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LayoutOriginCore(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->get_LayoutOriginCore(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides<D>::LayoutOriginCore(winrt::Windows::Foundation::Point const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LayoutOriginCore(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>**)this;
            check_hresult(_winrt_abi_type->put_LayoutOriginCore(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutContextOverrides2<D>::VisibleRectCore() const
    {
        winrt::Windows::Foundation::Rect result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->VisibleRectCore(put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>**)this;
            check_hresult(_winrt_abi_type->VisibleRectCore(put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutFactory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutOverrides<D>::InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InitializeForContextCore(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->InitializeForContextCore(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutOverrides<D>::UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->UninitializeForContextCore(*(void**)(&context)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->UninitializeForContextCore(*(void**)(&context)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutOverrides<D>::MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MeasureOverride(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->MeasureOverride(*(void**)(&context), impl::bind_in(availableSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutOverrides<D>::ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ArrangeOverride(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->ArrangeOverride(*(void**)(&context), impl::bind_in(finalSize), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingLayoutOverrides<D>::OnItemsChangedCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::IInspectable const& source, winrt::Microsoft::UI::Xaml::Interop::NotifyCollectionChangedEventArgs const& args) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemsChangedCore(*(void**)(&context), *(void**)(&source), *(void**)(&args)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemsChangedCore(*(void**)(&context), *(void**)(&source), *(void**)(&args)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanel<D>::ItemContainerGenerator() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemContainerGenerator(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_ItemContainerGenerator(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelOverrides<D>::OnItemsChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs const& args) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnItemsChanged(*(void**)(&sender), *(void**)(&args)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)this;
            check_hresult(_winrt_abi_type->OnItemsChanged(*(void**)(&sender), *(void**)(&args)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelOverrides<D>::OnClearChildren() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnClearChildren());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)this;
            check_hresult(_winrt_abi_type->OnClearChildren());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelOverrides<D>::BringIndexIntoView(int32_t index) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->BringIndexIntoView(index));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>**)this;
            check_hresult(_winrt_abi_type->BringIndexIntoView(index));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelProtected<D>::AddInternalChild(winrt::Microsoft::UI::Xaml::UIElement const& child) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->AddInternalChild(*(void**)(&child)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)this;
            check_hresult(_winrt_abi_type->AddInternalChild(*(void**)(&child)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelProtected<D>::InsertInternalChild(int32_t index, winrt::Microsoft::UI::Xaml::UIElement const& child) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->InsertInternalChild(index, *(void**)(&child)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)this;
            check_hresult(_winrt_abi_type->InsertInternalChild(index, *(void**)(&child)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingPanelProtected<D>::RemoveInternalChildRange(int32_t index, int32_t range) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->RemoveInternalChildRange(index, range));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>**)this;
            check_hresult(_winrt_abi_type->RemoveInternalChildRange(index, range));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::AreScrollSnapPointsRegular() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegular(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegular(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::AreScrollSnapPointsRegular(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreScrollSnapPointsRegular(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_AreScrollSnapPointsRegular(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::CleanUpVirtualizedItemEvent(winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CleanUpVirtualizedItemEvent(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            check_hresult(_winrt_abi_type->add_CleanUpVirtualizedItemEvent(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::CleanUpVirtualizedItemEvent(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, CleanUpVirtualizedItemEvent_revoker>(this, CleanUpVirtualizedItemEvent(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanel<D>::CleanUpVirtualizedItemEvent(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CleanUpVirtualizedItemEvent(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>**)this;
            _winrt_abi_type->remove_CleanUpVirtualizedItemEvent(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelOverrides<D>::OnCleanUpVirtualizedItem(winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const& e) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnCleanUpVirtualizedItem(*(void**)(&e)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>**)this;
            check_hresult(_winrt_abi_type->OnCleanUpVirtualizedItem(*(void**)(&e)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::AreScrollSnapPointsRegularProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegularProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreScrollSnapPointsRegularProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::VirtualizationModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VirtualizationModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_VirtualizationModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::GetVirtualizationMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        winrt::Microsoft::UI::Xaml::Controls::VirtualizationMode result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVirtualizationMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetVirtualizationMode(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::SetVirtualizationMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::VirtualizationMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVirtualizationMode(*(void**)(&element), static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetVirtualizationMode(*(void**)(&element), static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::IsVirtualizingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsVirtualizingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsVirtualizingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IVirtualizingStackPanelStatics<D>::GetIsVirtualizing(winrt::Microsoft::UI::Xaml::DependencyObject const& o) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsVirtualizing(*(void**)(&o), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsVirtualizing(*(void**)(&o), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreWebView2() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CoreWebView2(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->get_CoreWebView2(&value));
        }
        return winrt::Microsoft::Web::WebView2::Core::CoreWebView2{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::EnsureCoreWebView2Async() const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2Async(&operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2Async(&operation));
        }
        return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::ExecuteScriptAsync(param::hstring const& javascriptCode) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ExecuteScriptAsync(*(void**)(&javascriptCode), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->ExecuteScriptAsync(*(void**)(&javascriptCode), &operation));
        }
        return winrt::Windows::Foundation::IAsyncOperation<hstring>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::Source() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->get_Source(&value));
        }
        return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::Source(winrt::Windows::Foundation::Uri const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->put_Source(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CanGoForward() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoForward(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->get_CanGoForward(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CanGoForward(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanGoForward(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->put_CanGoForward(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CanGoBack() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoBack(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->get_CanGoBack(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CanGoBack(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanGoBack(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->put_CanGoBack(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::DefaultBackgroundColor() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultBackgroundColor(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->get_DefaultBackgroundColor(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::DefaultBackgroundColor(winrt::Windows::UI::Color const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DefaultBackgroundColor(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->put_DefaultBackgroundColor(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::Reload() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Reload());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->Reload());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::GoForward() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GoForward());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->GoForward());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::GoBack() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GoBack());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->GoBack());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigateToString(param::hstring const& htmlContent) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->NavigateToString(*(void**)(&htmlContent)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->NavigateToString(*(void**)(&htmlContent)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::Close() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Close());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->Close());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationCompletedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_NavigationCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->add_NavigationCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationCompletedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, NavigationCompleted_revoker>(this, NavigationCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_NavigationCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            _winrt_abi_type->remove_NavigationCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::WebMessageReceived(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2WebMessageReceivedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_WebMessageReceived(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->add_WebMessageReceived(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::WebMessageReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2WebMessageReceivedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, WebMessageReceived_revoker>(this, WebMessageReceived(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::WebMessageReceived(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_WebMessageReceived(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            _winrt_abi_type->remove_WebMessageReceived(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationStartingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_NavigationStarting(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->add_NavigationStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationStartingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, NavigationStarting_revoker>(this, NavigationStarting(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::NavigationStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_NavigationStarting(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            _winrt_abi_type->remove_NavigationStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreProcessFailed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2ProcessFailedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CoreProcessFailed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->add_CoreProcessFailed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreProcessFailed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2ProcessFailedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CoreProcessFailed_revoker>(this, CoreProcessFailed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreProcessFailed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CoreProcessFailed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            _winrt_abi_type->remove_CoreProcessFailed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreWebView2Initialized(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::UI::Xaml::Controls::CoreWebView2InitializedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CoreWebView2Initialized(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            check_hresult(_winrt_abi_type->add_CoreWebView2Initialized(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreWebView2Initialized(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::UI::Xaml::Controls::CoreWebView2InitializedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, CoreWebView2Initialized_revoker>(this, CoreWebView2Initialized(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2<D>::CoreWebView2Initialized(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CoreWebView2Initialized(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2>**)this;
            _winrt_abi_type->remove_CoreWebView2Initialized(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView22<D>::EnsureCoreWebView2Async(winrt::Microsoft::Web::WebView2::Core::CoreWebView2Environment const& environment) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView22>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView22, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView22>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2WithEnvironmentAsync(*(void**)(&environment), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView22>**)this;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2WithEnvironmentAsync(*(void**)(&environment), &operation));
        }
        return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView22<D>::EnsureCoreWebView2Async(winrt::Microsoft::Web::WebView2::Core::CoreWebView2Environment const& environment, winrt::Microsoft::Web::WebView2::Core::CoreWebView2ControllerOptions const& controllerOptions) const
    {
        void* operation{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView22>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView22, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView22>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2WithEnvironmentAndOptionsAsync(*(void**)(&environment), *(void**)(&controllerOptions), &operation));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView22>**)this;
            check_hresult(_winrt_abi_type->EnsureCoreWebView2WithEnvironmentAndOptionsAsync(*(void**)(&environment), *(void**)(&controllerOptions), &operation));
        }
        return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2Factory<D>::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::WebView2{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2Statics<D>::SourceProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)this;
            check_hresult(_winrt_abi_type->get_SourceProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2Statics<D>::CanGoForwardProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoForwardProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)this;
            check_hresult(_winrt_abi_type->get_CanGoForwardProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2Statics<D>::CanGoBackProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanGoBackProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)this;
            check_hresult(_winrt_abi_type->get_CanGoBackProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWebView2Statics<D>::DefaultBackgroundColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DefaultBackgroundColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>**)this;
            check_hresult(_winrt_abi_type->get_DefaultBackgroundColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::ItemWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::ItemWidth(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::ItemHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::ItemHeight(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::HorizontalChildrenAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::HorizontalChildrenAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalChildrenAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalChildrenAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::VerticalChildrenAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::VerticalChildrenAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalChildrenAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_VerticalChildrenAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::MaximumRowsOrColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGrid<D>::MaximumRowsOrColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>**)this;
            check_hresult(_winrt_abi_type->put_MaximumRowsOrColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::ItemWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::ItemHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::HorizontalChildrenAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChildrenAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::VerticalChildrenAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChildrenAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IWrapGridStatics<D>::MaximumRowsOrColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>**)this;
            check_hresult(_winrt_abi_type->get_MaximumRowsOrColumnsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IXamlControlsResources<D>::UseCompactResources() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UseCompactResources(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>**)this;
            check_hresult(_winrt_abi_type->get_UseCompactResources(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IXamlControlsResources<D>::UseCompactResources(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_UseCompactResources(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>**)this;
            check_hresult(_winrt_abi_type->put_UseCompactResources(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IXamlControlsResourcesStatics<D>::EnsureRevealLights(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->EnsureRevealLights(*(void**)(&element)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>**)this;
            check_hresult(_winrt_abi_type->EnsureRevealLights(*(void**)(&element)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_IXamlControlsResourcesStatics<D>::UseCompactResourcesProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_UseCompactResourcesProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>**)this;
            check_hresult(_winrt_abi_type->get_UseCompactResourcesProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarView const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            *result = detach_from<hstring>((*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* key, void** operation) noexcept final try
        {
            clear_abi(operation);
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IInspectable>>((*this)(*reinterpret_cast<hstring const*>(&key)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(void* sender, void* e) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs>
    {
        int32_t __stdcall get_Anchor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Anchor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Anchor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Anchor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AnchorCandidates(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::UIElement>>(this->shim().AnchorCandidates());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon>
    {
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2 const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackIconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().FallbackIconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FallbackIconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FallbackIconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeft(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MirroredWhenRightToLeft());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MirroredWhenRightToLeft(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MirroredWhenRightToLeft(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnimatedIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource>
    {
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2 const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackIconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().FallbackIconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FallbackIconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FallbackIconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeft(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MirroredWhenRightToLeft());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MirroredWhenRightToLeft(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MirroredWhenRightToLeft(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnimatedIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics>
    {
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackIconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FallbackIconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MirroredWhenRightToLeftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics>
    {
        int32_t __stdcall get_StateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetState(void* object, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetState(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object), *reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetState(void* object, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().GetState(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackIconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FallbackIconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MirroredWhenRightToLeftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>
    {
        int32_t __stdcall get_RootVisual(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Composition::Visual>(this->shim().RootVisual());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Size(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().Size());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Duration(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().Duration());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>
    {
        int32_t __stdcall CreateAnimations() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CreateAnimations();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DestroyAnimations() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DestroyAnimations();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer>
    {
        int32_t __stdcall get_Diagnostics(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Diagnostics());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Duration(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().Duration());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().FallbackContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FallbackContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FallbackContent(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoPlay(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AutoPlay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AutoPlay(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AutoPlay(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAnimatedVisualLoaded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAnimatedVisualLoaded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlaying(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPlaying());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaybackRate(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().PlaybackRate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaybackRate(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaybackRate(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProgressObject(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Composition::CompositionObject>(this->shim().ProgressObject());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Stretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Stretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Stretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Pause() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pause();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PlayAsync(double fromProgress, double toProgress, bool looped, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().PlayAsync(fromProgress, toProgress, looped));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Resume() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Resume();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetProgress(double progress) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetProgress(progress);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Stop() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stop();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2>
    {
        int32_t __stdcall get_AnimationOptimization(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PlayerAnimationOptimization>(this->shim().AnimationOptimization());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AnimationOptimization(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnimationOptimization(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PlayerAnimationOptimization const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics>
    {
        int32_t __stdcall get_AutoPlayProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AutoPlayProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DiagnosticsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DiagnosticsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DurationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DurationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FallbackContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FallbackContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAnimatedVisualLoadedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsAnimatedVisualLoadedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlayingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPlayingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaybackRateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaybackRateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2>
    {
        int32_t __stdcall get_AnimationOptimizationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AnimationOptimizationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>
    {
        int32_t __stdcall TryCreateAnimatedVisual(void* compositor, void** diagnostics, void** result) noexcept final try
        {
            if (diagnostics) *diagnostics = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_diagnostics;
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual>(this->shim().TryCreateAnimatedVisual(*reinterpret_cast<winrt::Microsoft::UI::Composition::Compositor const*>(&compositor), winrt_impl_diagnostics));
                if (diagnostics) *diagnostics = detach_abi(winrt_impl_diagnostics);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2>
    {
        int32_t __stdcall get_Markers(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IMapView<hstring, double>>(this->shim().Markers());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetColorProperty(void* propertyName, struct struct_Windows_UI_Color value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetColorProperty(*reinterpret_cast<hstring const*>(&propertyName), *reinterpret_cast<winrt::Windows::UI::Color const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3>
    {
        int32_t __stdcall TryCreateAnimatedVisual(void* compositor, void** diagnostics, bool createAnimations, void** result) noexcept final try
        {
            if (diagnostics) *diagnostics = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_diagnostics;
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2>(this->shim().TryCreateAnimatedVisual(*reinterpret_cast<winrt::Microsoft::UI::Composition::Compositor const*>(&compositor), winrt_impl_diagnostics, createAnimations));
                if (diagnostics) *diagnostics = detach_abi(winrt_impl_diagnostics);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar>
    {
        int32_t __stdcall get_ScrollController(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>(this->shim().ScrollController());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Labels(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel>>(this->shim().Labels());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Labels(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Labels(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::IElementFactory>(this->shim().LabelTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LabelTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LabelTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::IElementFactory const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DetailLabelTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::IElementFactory>(this->shim().DetailLabelTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DetailLabelTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DetailLabelTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::IElementFactory const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().SmallChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SmallChange(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SmallChange(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Scrolling(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Scrolling(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Scrolling(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Scrolling(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DetailLabelRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DetailLabelRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarDetailLabelRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DetailLabelRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DetailLabelRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory>
    {
        int32_t __stdcall CreateInstance(void* content, double scrollOffset, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&content), scrollOffset));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs>
    {
        int32_t __stdcall get_ScrollOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollingEventKind(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventKind>(this->shim().ScrollingEventKind());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics>
    {
        int32_t __stdcall get_LabelsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DetailLabelTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DetailLabelTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallChangeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SmallChangeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar>
    {
        int32_t __stdcall get_IsOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSticky(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSticky());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSticky(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSticky(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClosedDisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBarClosedDisplayMode>(this->shim().ClosedDisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClosedDisplayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClosedDisplayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AppBarClosedDisplayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Opening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Opening(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Opening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Opening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Opened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Opened(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Opened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Opened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closing(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton>
    {
        int32_t __stdcall get_Label(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Label());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Label(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Label(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelPosition(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition>(this->shim().LabelPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LabelPosition(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LabelPosition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverride(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().KeyboardAcceleratorTextOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_KeyboardAcceleratorTextOverride(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().KeyboardAcceleratorTextOverride(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarButtonTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBarButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics>
    {
        int32_t __stdcall get_LabelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelPositionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelPositionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverrideProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().KeyboardAcceleratorTextOverrideProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCompactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCompactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInOverflowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsInOverflowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DynamicOverflowOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DynamicOverflowOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainer>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBarElementContainer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics>
    {
        int32_t __stdcall get_IsCompactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCompactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInOverflowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsInOverflowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DynamicOverflowOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DynamicOverflowOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>
    {
        int32_t __stdcall OnClosed(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnClosed(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnOpened(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnOpened(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnClosing(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnClosing(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnOpening(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnOpening(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparator> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparator>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBarSeparator>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics>
    {
        int32_t __stdcall get_IsCompactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCompactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInOverflowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsInOverflowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DynamicOverflowOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DynamicOverflowOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics>
    {
        int32_t __stdcall get_IsOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsStickyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsStickyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClosedDisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ClosedDisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton>
    {
        int32_t __stdcall get_Label(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Label());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Label(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Label(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelPosition(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition>(this->shim().LabelPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LabelPosition(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LabelPosition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CommandBarLabelPosition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverride(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().KeyboardAcceleratorTextOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_KeyboardAcceleratorTextOverride(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().KeyboardAcceleratorTextOverride(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarToggleButtonTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBarToggleButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics>
    {
        int32_t __stdcall get_LabelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LabelPositionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LabelPositionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverrideProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().KeyboardAcceleratorTextOverrideProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCompactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCompactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInOverflowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsInOverflowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DynamicOverflowOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DynamicOverflowOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox>
    {
        int32_t __stdcall get_MaxSuggestionListHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxSuggestionListHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxSuggestionListHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxSuggestionListHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSuggestionListOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSuggestionListOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSuggestionListOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSuggestionListOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextMemberPath(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().TextMemberPath());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextMemberPath(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextMemberPath(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UpdateTextOnSelect(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().UpdateTextOnSelect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UpdateTextOnSelect(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UpdateTextOnSelect(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoMaximizeSuggestionArea(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AutoMaximizeSuggestionArea());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AutoMaximizeSuggestionArea(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AutoMaximizeSuggestionArea(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextBoxStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().TextBoxStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextBoxStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextBoxStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_QueryIcon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().QueryIcon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_QueryIcon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().QueryIcon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SuggestionChosen(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SuggestionChosen(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SuggestionChosen(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SuggestionChosen(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_QuerySubmitted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().QuerySubmitted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox, winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_QuerySubmitted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().QuerySubmitted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs>
    {
        int32_t __stdcall get_QueryText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().QueryText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ChosenSuggestion(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ChosenSuggestion());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics>
    {
        int32_t __stdcall get_MaxSuggestionListHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxSuggestionListHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSuggestionListOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSuggestionListOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextMemberPathProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextMemberPathProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UpdateTextOnSelectProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UpdateTextOnSelectProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoMaximizeSuggestionAreaProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AutoMaximizeSuggestionAreaProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextBoxStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextBoxStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_QueryIconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().QueryIconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs>
    {
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs>
    {
        int32_t __stdcall get_Reason(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason>(this->shim().Reason());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Reason(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Reason(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestionBoxTextChangeReason const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CheckCurrent(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().CheckCurrent());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics>
    {
        int32_t __stdcall get_ReasonProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReasonProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon>
    {
        int32_t __stdcall get_UriSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().UriSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UriSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UriSource(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAsMonochrome(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowAsMonochrome());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowAsMonochrome(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAsMonochrome(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BitmapIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource>
    {
        int32_t __stdcall get_UriSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().UriSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UriSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UriSource(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAsMonochrome(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowAsMonochrome());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowAsMonochrome(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAsMonochrome(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BitmapIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics>
    {
        int32_t __stdcall get_UriSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UriSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAsMonochromeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowAsMonochromeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics>
    {
        int32_t __stdcall get_UriSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UriSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAsMonochromeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowAsMonochromeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBorder> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBorder>
    {
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Child(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Child());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Child(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Child(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ChildTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ChildTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ChildTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ChildTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundTransition(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::BrushTransition>(this->shim().BackgroundTransition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundTransition(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundTransition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::BrushTransition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBorderStatics>
    {
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ChildTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ChildTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ItemClicked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemClicked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar, winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItemClickedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemClicked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemClicked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs>
    {
        int32_t __stdcall get_Index(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Index());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics>
    {
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IButton>
    {
        int32_t __stdcall get_Flyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().Flyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Flyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Flyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Button>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IButtonStatics>
    {
        int32_t __stdcall get_FlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker>
    {
        int32_t __stdcall get_Date(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().Date());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Date(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Date(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCalendarOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsCalendarOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsCalendarOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsCalendarOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DateFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DateFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DateFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DateFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarViewStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CalendarViewStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarViewStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarViewStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MinDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinDate(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MaxDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxDate(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTodayHighlighted(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTodayHighlighted());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTodayHighlighted(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTodayHighlighted(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode>(this->shim().DisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstDayOfWeek(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Globalization::DayOfWeek>(this->shim().FirstDayOfWeek());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstDayOfWeek(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstDayOfWeek(*reinterpret_cast<winrt::Windows::Globalization::DayOfWeek const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayOfWeekFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DayOfWeekFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayOfWeekFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayOfWeekFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CalendarIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOutOfScopeEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOutOfScopeEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOutOfScopeEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOutOfScopeEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupLabelVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsGroupLabelVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsGroupLabelVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsGroupLabelVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CalendarViewDayItemChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CalendarViewDayItemChanging(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CalendarViewDayItemChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarViewDayItemChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DateChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DateChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker, winrt::Microsoft::UI::Xaml::Controls::CalendarDatePickerDateChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DateChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Opened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Opened(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Opened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Opened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall SetDisplayDate(int64_t date) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDisplayDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&date));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetYearDecadeDisplayDimensions(columns, rows);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs>
    {
        int32_t __stdcall get_NewDate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().NewDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OldDate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().OldDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics>
    {
        int32_t __stdcall get_DateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCalendarOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCalendarOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DateFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DateFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarViewStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarViewStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinDateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinDateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxDateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTodayHighlightedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTodayHighlightedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstDayOfWeekProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstDayOfWeekProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayOfWeekFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayOfWeekFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOutOfScopeEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOutOfScopeEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupLabelVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsGroupLabelVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView>
    {
        int32_t __stdcall get_CalendarIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CalendarIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayOfWeekFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DayOfWeekFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayOfWeekFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayOfWeekFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupLabelVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsGroupLabelVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsGroupLabelVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsGroupLabelVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode>(this->shim().DisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDisplayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstDayOfWeek(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Globalization::DayOfWeek>(this->shim().FirstDayOfWeek());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstDayOfWeek(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstDayOfWeek(*reinterpret_cast<winrt::Windows::Globalization::DayOfWeek const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOutOfScopeEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOutOfScopeEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOutOfScopeEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOutOfScopeEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTodayHighlighted(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTodayHighlighted());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTodayHighlighted(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTodayHighlighted(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MaxDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxDate(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MinDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinDate(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NumberOfWeeksInView(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().NumberOfWeeksInView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NumberOfWeeksInView(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NumberOfWeeksInView(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDates(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::DateTime>>(this->shim().SelectedDates());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FocusBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().FocusBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FocusBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FocusBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedHoverBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedHoverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedHoverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedHoverBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedPressedBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPressedBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPressedBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedDisabledBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedDisabledBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDisabledBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HoverBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().HoverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HoverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HoverBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().PressedBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PressedBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PressedBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodaySelectedInnerBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodaySelectedInnerBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodaySelectedInnerBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodaySelectedInnerBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutStrikethroughBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BlackoutStrikethroughBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BlackoutStrikethroughBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BlackoutStrikethroughBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BlackoutBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BlackoutBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BlackoutBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().OutOfScopeBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OutOfScopeBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OutOfScopeBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemHoverBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemHoverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemHoverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemHoverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemPressedBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemPressedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemPressedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemPressedBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemDisabledBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemDisabledBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemDisabledBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemDisabledBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBlackoutBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayBlackoutBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayBlackoutBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayBlackoutBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayHoverBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayHoverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayHoverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayHoverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayPressedBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayPressedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayPressedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayPressedBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayDisabledBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayDisabledBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayDisabledBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayDisabledBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().PressedForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PressedForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PressedForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BlackoutForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BlackoutForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BlackoutForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBlackoutForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().TodayBlackoutForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayBlackoutForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayBlackoutForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedHoverForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedHoverForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedHoverForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedHoverForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedPressedForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPressedForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPressedForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().SelectedDisabledForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedDisabledForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDisabledForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().OutOfScopeForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OutOfScopeForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OutOfScopeForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeHoverForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().OutOfScopeHoverForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OutOfScopeHoverForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OutOfScopeHoverForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopePressedForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().OutOfScopePressedForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OutOfScopePressedForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OutOfScopePressedForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().CalendarItemForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().DisabledForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().DayItemFontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayItemFontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayItemFontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DayItemFontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayItemFontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayItemFontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().DayItemFontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayItemFontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayItemFontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().DayItemFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayItemFontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayItemFontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().TodayFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TodayFontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TodayFontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FirstOfMonthLabelFontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfMonthLabelFontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfMonthLabelFontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FirstOfMonthLabelFontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfMonthLabelFontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfMonthLabelFontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FirstOfMonthLabelFontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfMonthLabelFontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfMonthLabelFontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FirstOfMonthLabelFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfMonthLabelFontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfMonthLabelFontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().MonthYearItemFontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthYearItemFontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthYearItemFontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MonthYearItemFontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthYearItemFontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthYearItemFontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().MonthYearItemFontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthYearItemFontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthYearItemFontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().MonthYearItemFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthYearItemFontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthYearItemFontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FirstOfYearDecadeLabelFontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfYearDecadeLabelFontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfYearDecadeLabelFontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FirstOfYearDecadeLabelFontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfYearDecadeLabelFontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfYearDecadeLabelFontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FirstOfYearDecadeLabelFontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfYearDecadeLabelFontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfYearDecadeLabelFontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FirstOfYearDecadeLabelFontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfYearDecadeLabelFontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfYearDecadeLabelFontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().DayItemMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayItemMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayItemMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().MonthYearItemMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthYearItemMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthYearItemMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().FirstOfMonthLabelMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfMonthLabelMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfMonthLabelMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().FirstOfYearDecadeLabelMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FirstOfYearDecadeLabelMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FirstOfYearDecadeLabelMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalDayItemAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalDayItemAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalDayItemAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalDayItemAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalDayItemAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalDayItemAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalDayItemAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalDayItemAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalFirstOfMonthLabelAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalFirstOfMonthLabelAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalFirstOfMonthLabelAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalFirstOfMonthLabelAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalFirstOfMonthLabelAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalFirstOfMonthLabelAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalFirstOfMonthLabelAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalFirstOfMonthLabelAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().CalendarItemBorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemBorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemBorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarViewDayItemStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CalendarViewDayItemStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarViewDayItemStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarViewDayItemStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CalendarItemCornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarItemCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarItemCornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CalendarViewDayItemChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CalendarViewDayItemChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CalendarViewDayItemChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarViewDayItemChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectedDatesChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectedDatesChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectedDatesChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectedDatesChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDatesChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall SetDisplayDate(int64_t date) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDisplayDate(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&date));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetYearDecadeDisplayDimensions(int32_t columns, int32_t rows) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetYearDecadeDisplayDimensions(columns, rows);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem>
    {
        int32_t __stdcall get_IsBlackout(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsBlackout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsBlackout(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsBlackout(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Date(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().Date());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetDensityColors(void* colors) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDensityColors(*reinterpret_cast<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::UI::Color> const*>(&colors));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs>
    {
        int32_t __stdcall get_InRecycleQueue(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().InRecycleQueue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItem>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Phase(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<uint32_t>(this->shim().Phase());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterUpdateCallback(void* callback) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterUpdateCallback(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const*>(&callback));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterUpdateCallbackWithPhase(uint32_t callbackPhase, void* callback) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterUpdateCallback(callbackPhase, *reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CalendarView, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> const*>(&callback));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics>
    {
        int32_t __stdcall get_IsBlackoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsBlackoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CalendarView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs>
    {
        int32_t __stdcall get_AddedDates(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::DateTime>>(this->shim().AddedDates());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RemovedDates(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::DateTime>>(this->shim().RemovedDates());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics>
    {
        int32_t __stdcall get_CalendarIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayOfWeekFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayOfWeekFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupLabelVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsGroupLabelVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstDayOfWeekProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstDayOfWeekProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOutOfScopeEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOutOfScopeEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTodayHighlightedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTodayHighlightedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxDateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinDateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinDateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NumberOfWeeksInViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NumberOfWeeksInViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDatesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedDatesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FocusBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FocusBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedHoverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedHoverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPressedBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedDisabledBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HoverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HoverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PressedBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodaySelectedInnerBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodaySelectedInnerBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutStrikethroughBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BlackoutStrikethroughBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BlackoutBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OutOfScopeBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemHoverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemHoverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemPressedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemPressedBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemDisabledBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemDisabledBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBlackoutBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayBlackoutBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayHoverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayHoverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayPressedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayPressedBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayDisabledBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayDisabledBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PressedForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BlackoutForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BlackoutForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayBlackoutForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayBlackoutForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedHoverForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedHoverForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPressedForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedDisabledForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OutOfScopeForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopeHoverForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OutOfScopeHoverForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OutOfScopePressedForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OutOfScopePressedForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayItemFontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayItemFontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayItemFontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemFontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayItemFontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TodayFontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TodayFontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfMonthLabelFontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfMonthLabelFontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfMonthLabelFontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelFontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfMonthLabelFontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthYearItemFontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthYearItemFontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthYearItemFontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemFontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthYearItemFontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfYearDecadeLabelFontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfYearDecadeLabelFontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfYearDecadeLabelFontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelFontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfYearDecadeLabelFontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayItemMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayItemMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthYearItemMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthYearItemMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfMonthLabelMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfMonthLabelMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstOfYearDecadeLabelMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FirstOfYearDecadeLabelMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalDayItemAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalDayItemAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalDayItemAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalDayItemAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalFirstOfMonthLabelAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalFirstOfMonthLabelAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalFirstOfMonthLabelAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalFirstOfMonthLabelAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemBorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemBorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarViewDayItemStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarViewDayItemStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarItemCornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarItemCornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs>
    {
        int32_t __stdcall get_Bounds(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().Bounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICanvas> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICanvas>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Canvas>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics>
    {
        int32_t __stdcall get_LeftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLeft(void* element, double* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<double>(this->shim().GetLeft(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetLeft(void* element, double length) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetLeft(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), length);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTop(void* element, double* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<double>(this->shim().GetTop(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTop(void* element, double length) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetTop(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), length);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetZIndex(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetZIndex(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetZIndex(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetZIndex(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBox>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CheckBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs>
    {
        int32_t __stdcall get_GroupHeaderContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem>(this->shim().GroupHeaderContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupHeaderContainer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupHeaderContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().GroupIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Group(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Group());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs>
    {
        int32_t __stdcall get_ItemIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem>(this->shim().ItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsContainerPrepared(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsContainerPrepared());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsContainerPrepared(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsContainerPrepared(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs>
    {
        int32_t __stdcall get_Value(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UIElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().UIElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs>
    {
        int32_t __stdcall get_OldColor(struct struct_Windows_UI_Color* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Color>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Color>(this->shim().OldColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewColor(struct struct_Windows_UI_Color* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Color>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Color>(this->shim().NewColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker>
    {
        int32_t __stdcall get_Color(struct struct_Windows_UI_Color* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Color>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Color>(this->shim().Color());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Color(struct struct_Windows_UI_Color value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Color(*reinterpret_cast<winrt::Windows::UI::Color const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::UI::Color>>(this->shim().PreviousColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreviousColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreviousColor(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::UI::Color> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAlphaEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsAlphaEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsAlphaEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorSpectrumVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorSpectrumVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorSpectrumVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorSpectrumVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorPreviewVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorPreviewVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorPreviewVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorPreviewVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorSliderVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorSliderVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorSliderVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorSliderVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaSliderVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAlphaSliderVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsAlphaSliderVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsAlphaSliderVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsMoreButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsMoreButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsMoreButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsMoreButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorChannelTextInputVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorChannelTextInputVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorChannelTextInputVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorChannelTextInputVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaTextInputVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAlphaTextInputVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsAlphaTextInputVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsAlphaTextInputVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHexInputVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHexInputVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHexInputVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHexInputVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinHue(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MinHue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinHue(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinHue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHue(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxHue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxHue(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxHue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinSaturation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MinSaturation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinSaturation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinSaturation(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxSaturation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxSaturation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxSaturation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxSaturation(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinValue(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MinValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinValue(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxValue(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxValue(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColorSpectrumShape(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape>(this->shim().ColorSpectrumShape());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ColorSpectrumShape(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ColorSpectrumShape(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColorSpectrumComponents(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents>(this->shim().ColorSpectrumComponents());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ColorSpectrumComponents(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ColorSpectrumComponents(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ColorChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ColorChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ColorPicker, winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ColorChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ColorChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker2>
    {
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorPicker>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics>
    {
        int32_t __stdcall get_ColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreviousColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsAlphaEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorSpectrumVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorSpectrumVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorPreviewVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorPreviewVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorSliderVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorSliderVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaSliderVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsAlphaSliderVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsMoreButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsMoreButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorChannelTextInputVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorChannelTextInputVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAlphaTextInputVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsAlphaTextInputVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHexInputVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHexInputVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinHueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinHueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxHueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinSaturationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinSaturationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxSaturationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxSaturationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColorSpectrumShapeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColorSpectrumShapeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColorSpectrumComponentsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColorSpectrumComponentsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2>
    {
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition>
    {
        int32_t __stdcall get_Width(struct struct_Microsoft_UI_Xaml_GridLength* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::GridLength>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::GridLength>(this->shim().Width());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Width(struct struct_Microsoft_UI_Xaml_GridLength value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Width(*reinterpret_cast<winrt::Microsoft::UI::Xaml::GridLength const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ActualWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics>
    {
        int32_t __stdcall get_WidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().WidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox>
    {
        int32_t __stdcall get_IsDropDownOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDropDownOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDropDownOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDropDownOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsEditable(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsEditable());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsEditable(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsEditable(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSelectionBoxHighlighted(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSelectionBoxHighlighted());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDropDownHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxDropDownHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxDropDownHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxDropDownHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionBoxItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectionBoxItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionBoxItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().SelectionBoxItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSearchEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextSearchEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextSearchEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextSearchEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionChangedTrigger(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ComboBoxSelectionChangedTrigger>(this->shim().SelectionChangedTrigger());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionChangedTrigger(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChangedTrigger(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ComboBoxSelectionChangedTrigger const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().PlaceholderForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextBoxStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().TextBoxStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextBoxStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextBoxStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DropDownClosed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DropDownClosed(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DropDownClosed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DropDownClosed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DropDownOpened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DropDownOpened(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DropDownOpened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DropDownOpened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextSubmitted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextSubmitted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ComboBox, winrt::Microsoft::UI::Xaml::Controls::ComboBoxTextSubmittedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextSubmitted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextSubmitted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ComboBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ComboBoxItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>
    {
        int32_t __stdcall OnDropDownClosed(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDropDownClosed(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDropDownOpened(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDropDownOpened(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics>
    {
        int32_t __stdcall get_IsEditableProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsEditableProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDropDownOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDropDownOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxDropDownHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxDropDownHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSearchEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextSearchEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionChangedTriggerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionChangedTriggerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextBoxStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextBoxStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs>
    {
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar>
    {
        int32_t __stdcall get_PrimaryCommands(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>(this->shim().PrimaryCommands());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryCommands(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>(this->shim().SecondaryCommands());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandBarOverflowPresenterStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CommandBarOverflowPresenterStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CommandBarOverflowPresenterStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CommandBarOverflowPresenterStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandBarTemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarTemplateSettings>(this->shim().CommandBarTemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultLabelPosition(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarDefaultLabelPosition>(this->shim().DefaultLabelPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultLabelPosition(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultLabelPosition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CommandBarDefaultLabelPosition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility>(this->shim().OverflowButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OverflowButtonVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OverflowButtonVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDynamicOverflowEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDynamicOverflowEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDynamicOverflowEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDynamicOverflowEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DynamicOverflowItemsChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DynamicOverflowItemsChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::CommandBar, winrt::Microsoft::UI::Xaml::Controls::DynamicOverflowItemsChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DynamicOverflowItemsChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DynamicOverflowItemsChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>
    {
        int32_t __stdcall get_IsCompact(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsCompact());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsCompact(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsCompact(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInOverflow(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsInOverflow());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DynamicOverflowOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().DynamicOverflowOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DynamicOverflowOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DynamicOverflowOrder(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout>
    {
        int32_t __stdcall get_PrimaryCommands(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>(this->shim().PrimaryCommands());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryCommands(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>(this->shim().SecondaryCommands());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2>
    {
        int32_t __stdcall get_AlwaysExpanded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AlwaysExpanded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AlwaysExpanded(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AlwaysExpanded(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenter>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics>
    {
        int32_t __stdcall get_PrimaryCommandsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryCommandsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryCommandsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryCommandsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandBarOverflowPresenterStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandBarOverflowPresenterStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultLabelPositionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultLabelPositionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverflowButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDynamicOverflowEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDynamicOverflowEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs>
    {
        int32_t __stdcall get_ItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem>(this->shim().ItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InRecycleQueue(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().InRecycleQueue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Phase(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<uint32_t>(this->shim().Phase());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterUpdateCallback(void* callback) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterUpdateCallback(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const*>(&callback));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterUpdateCallbackWithPhase(uint32_t callbackPhase, void* callback) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterUpdateCallback(callbackPhase, *reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const*>(&callback));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().ContentTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ContentTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateRoot(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().ContentTemplateRoot());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>
    {
        int32_t __stdcall OnContentChanged(void* oldContent, void* newContent) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&oldContent), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&newContent));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnContentTemplateChanged(void* oldContentTemplate, void* newContentTemplate) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentTemplateChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&oldContentTemplate), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&newContentTemplate));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnContentTemplateSelectorChanged(void* oldContentTemplateSelector, void* newContentTemplateSelector) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentTemplateSelectorChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&oldContentTemplateSelector), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&newContentTemplateSelector));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog>
    {
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().TitleTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TitleTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TitleTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FullSizeDesired(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().FullSizeDesired());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FullSizeDesired(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FullSizeDesired(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PrimaryButtonText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PrimaryButtonText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryButtonText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SecondaryButtonText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SecondaryButtonText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryButtonText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CloseButtonText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().PrimaryButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PrimaryButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().SecondaryButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SecondaryButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().CloseButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().PrimaryButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PrimaryButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SecondaryButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SecondaryButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CloseButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPrimaryButtonEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPrimaryButtonEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPrimaryButtonEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPrimaryButtonEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSecondaryButtonEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSecondaryButtonEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSecondaryButtonEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSecondaryButtonEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().PrimaryButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PrimaryButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().SecondaryButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SecondaryButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CloseButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultButton(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialogButton>(this->shim().DefaultButton());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultButton(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultButton(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContentDialogButton const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Closing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Opened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Opened(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogOpenedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Opened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Opened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PrimaryButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PrimaryButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PrimaryButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SecondaryButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SecondaryButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SecondaryButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CloseButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CloseButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CloseButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall Hide() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Hide();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShowAsync(void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>>(this->shim().ShowAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShowAsyncWithPlacement(int32_t placement, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>>(this->shim().ShowAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContentDialogPlacement const*>(&placement)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral>
    {
        int32_t __stdcall Complete() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Complete();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetDeferral(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickDeferral>(this->shim().GetDeferral());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs>
    {
        int32_t __stdcall get_Result(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>(this->shim().Result());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral>
    {
        int32_t __stdcall Complete() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Complete();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs>
    {
        int32_t __stdcall get_Result(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialogResult>(this->shim().Result());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetDeferral(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingDeferral>(this->shim().GetDeferral());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentDialog>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogOpenedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogOpenedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics>
    {
        int32_t __stdcall get_TitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FullSizeDesiredProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FullSizeDesiredProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryButtonTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryButtonTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPrimaryButtonEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPrimaryButtonEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSecondaryButtonEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSecondaryButtonEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PrimaryButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultButtonProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultButtonProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().ContentTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ContentTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().FontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStretch(*reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CharacterSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterSpacing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment>(this->shim().OpticalMarginAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpticalMarginAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpticalMarginAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBounds(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextLineBounds>(this->shim().TextLineBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextLineBounds(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextLineBounds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextLineBounds const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundTransition(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::BrushTransition>(this->shim().BackgroundTransition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundTransition(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundTransition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::BrushTransition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextWrapping>(this->shim().TextWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextWrapping(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLines(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLines(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLines(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategy(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::LineStackingStrategy>(this->shim().LineStackingStrategy());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineStackingStrategy(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineStackingStrategy(*reinterpret_cast<winrt::Microsoft::UI::Xaml::LineStackingStrategy const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LineHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ContentPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>
    {
        int32_t __stdcall OnContentTemplateChanged(void* oldContentTemplate, void* newContentTemplate) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentTemplateChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&oldContentTemplate), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&newContentTemplate));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnContentTemplateSelectorChanged(void* oldContentTemplateSelector, void* newContentTemplateSelector) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentTemplateSelectorChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&oldContentTemplateSelector), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&newContentTemplateSelector));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpticalMarginAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextLineBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrappingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextWrappingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLinesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLinesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineStackingStrategyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs>
    {
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CursorLeft(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CursorLeft());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CursorTop(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CursorTop());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControl>
    {
        int32_t __stdcall get_IsFocusEngagementEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFocusEngagementEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFocusEngagementEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFocusEngagementEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFocusEngaged(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFocusEngaged());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFocusEngaged(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFocusEngaged(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequiresPointer(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RequiresPointer>(this->shim().RequiresPointer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RequiresPointer(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RequiresPointer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RequiresPointer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().FontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStretch(*reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CharacterSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterSpacing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabNavigation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::KeyboardNavigationMode>(this->shim().TabNavigation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabNavigation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabNavigation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::KeyboardNavigationMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Template(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ControlTemplate>(this->shim().Template());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Template(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Template(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ControlTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultStyleResourceUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().DefaultStyleResourceUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultStyleResourceUri(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultStyleResourceUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ElementSoundMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::ElementSoundMode>(this->shim().ElementSoundMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ElementSoundMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ElementSoundMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::ElementSoundMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_FocusEngaged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().FocusEngaged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_FocusEngaged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FocusEngaged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_FocusDisengaged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().FocusDisengaged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_FocusDisengaged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FocusDisengaged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_IsEnabledChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().IsEnabledChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyPropertyChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsEnabledChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsEnabledChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall RemoveFocusEngagement() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RemoveFocusEngagement();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ApplyTemplate(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ApplyTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Control>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>
    {
        int32_t __stdcall OnPointerEntered(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerEntered(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerPressed(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerPressed(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerMoved(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerMoved(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerReleased(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerReleased(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerExited(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerExited(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerCaptureLost(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerCaptureLost(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerCanceled(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerCanceled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPointerWheelChanged(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPointerWheelChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnTapped(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnTapped(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::TappedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDoubleTapped(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDoubleTapped(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::DoubleTappedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnHolding(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnHolding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::HoldingRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnRightTapped(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnRightTapped(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::RightTappedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnManipulationStarting(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnManipulationStarting(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ManipulationStartingRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnManipulationInertiaStarting(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnManipulationInertiaStarting(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ManipulationInertiaStartingRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnManipulationStarted(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnManipulationStarted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ManipulationStartedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnManipulationDelta(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnManipulationDelta(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnManipulationCompleted(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnManipulationCompleted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnKeyUp(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnKeyUp(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnKeyDown(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnKeyDown(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPreviewKeyDown(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPreviewKeyDown(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnPreviewKeyUp(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnPreviewKeyUp(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnGotFocus(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnGotFocus(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnLostFocus(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnLostFocus(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnCharacterReceived(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnCharacterReceived(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDragEnter(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDragEnter(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDragLeave(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDragLeave(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDragOver(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDragOver(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnDrop(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnDrop(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>
    {
        int32_t __stdcall get_DefaultStyleKey(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().DefaultStyleKey());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultStyleKey(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultStyleKey(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetTemplateChild(void* childName, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().GetTemplateChild(*reinterpret_cast<hstring const*>(&childName)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControlStatics>
    {
        int32_t __stdcall get_IsFocusEngagementEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFocusEngagementEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFocusEngagedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFocusEngagedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequiresPointerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RequiresPointerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabNavigationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabNavigationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultStyleKeyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultStyleKeyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultStyleResourceUriProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultStyleResourceUriProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ElementSoundModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ElementSoundModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTemplateFocusTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTemplateFocusTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsTemplateFocusTarget(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsTemplateFocusTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsTemplateFocusTarget(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsTemplateFocusTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTemplateKeyTipTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTemplateKeyTipTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsTemplateKeyTipTarget(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsTemplateKeyTipTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsTemplateKeyTipTarget(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsTemplateKeyTipTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlTemplate> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IControlTemplate>
    {
        int32_t __stdcall get_TargetType(struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Xaml::Interop::TypeName>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Xaml::Interop::TypeName>(this->shim().TargetType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TargetType(struct struct_Windows_UI_Xaml_Interop_TypeName value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TargetType(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs>
    {
        int32_t __stdcall get_Exception(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(this->shim().Exception());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector>
    {
        int32_t __stdcall SelectTemplate(void* item, void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().SelectTemplate(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectTemplateForItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().SelectTemplate(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>
    {
        int32_t __stdcall SelectTemplateCore(void* item, void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().SelectTemplateCore(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectTemplateForItemCore(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().SelectTemplateCore(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs>
    {
        int32_t __stdcall get_OldDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().OldDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().NewDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CalendarIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Date(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().Date());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Date(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Date(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().DayVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MonthVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().YearVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_YearVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().YearVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DayFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().MonthFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().YearFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_YearFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().YearFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinYear(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MinYear());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinYear(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinYear(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxYear(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MaxYear());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxYear(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxYear(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().SelectedDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedDate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDate(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DateChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DateChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerValueChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DateChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectedDateChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectedDateChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePicker, winrt::Microsoft::UI::Xaml::Controls::DatePickerSelectedValueChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectedDateChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DatePicker>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout>
    {
        int32_t __stdcall get_CalendarIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CalendarIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CalendarIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CalendarIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Date(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().Date());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Date(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Date(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().DayVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MonthVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().YearVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_YearVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().YearVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinYear(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MinYear());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinYear(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinYear(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxYear(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().MaxYear());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxYear(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxYear(*reinterpret_cast<winrt::Windows::Foundation::DateTime const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DayFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DayFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DayFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().MonthFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MonthFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MonthFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearFormat(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().YearFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_YearFormat(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().YearFormat(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DatePicked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DatePicked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::DatePickedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DatePicked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DatePicked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ShowAtAsync(void* target, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>>(this->shim().ShowAtAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&target)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem>
    {
        int32_t __stdcall get_PrimaryText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PrimaryText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PrimaryText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrimaryText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SecondaryText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SecondaryText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SecondaryText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics>
    {
        int32_t __stdcall get_PrimaryTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PrimaryTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SecondaryTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SecondaryTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter>
    {
        int32_t __stdcall get_IsDefaultShadowEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDefaultShadowEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDefaultShadowEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDefaultShadowEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics>
    {
        int32_t __stdcall get_IsDefaultShadowEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDefaultShadowEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics>
    {
        int32_t __stdcall get_CalendarIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().YearVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinYearProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinYearProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxYearProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxYearProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().YearFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs>
    {
        int32_t __stdcall get_OldDate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().OldDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewDate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::DateTime>>(this->shim().NewDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CalendarIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CalendarIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().YearVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DayFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DayFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MonthFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MonthFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_YearFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().YearFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinYearProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinYearProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxYearProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxYearProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedDateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs>
    {
        int32_t __stdcall get_OldDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().OldDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewDate(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::DateTime>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().NewDate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropResult(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation>(this->shim().DropResult());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackage>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButton>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DropDownButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource>
    {
        int32_t __stdcall add_AnimatedVisualInvalidated(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().AnimatedVisualInvalidated(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_AnimatedVisualInvalidated(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnimatedVisualInvalidated(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs>
    {
        int32_t __stdcall get_Action(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CommandBarDynamicOverflowAction>(this->shim().Action());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpander> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpander>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().HeaderTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpanded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsExpanded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsExpanded(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsExpanded(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ExpandDirection>(this->shim().ExpandDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ExpandDirection(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExpandDirection(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ExpandDirection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Expanding(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Expanding(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderExpandingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Expanding(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Expanding(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Collapsed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Collapsed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Expander, winrt::Microsoft::UI::Xaml::Controls::ExpanderCollapsedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Collapsed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Collapsed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ExpanderTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderCollapsedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderCollapsedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderExpandingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderExpandingEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Expander>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpandedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsExpandedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDirectionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExpandDirectionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings>
    {
        int32_t __stdcall get_ContentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ContentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeContentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeContentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlipView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlipView>
    {
        int32_t __stdcall get_UseTouchAnimationsForAllNavigation(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().UseTouchAnimationsForAllNavigation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UseTouchAnimationsForAllNavigation(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UseTouchAnimationsForAllNavigation(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::FlipView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::FlipViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics>
    {
        int32_t __stdcall get_UseTouchAnimationsForAllNavigationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UseTouchAnimationsForAllNavigationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FlyoutPresenterStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().FlyoutPresenterStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FlyoutPresenterStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FlyoutPresenterStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Flyout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter>
    {
        int32_t __stdcall get_IsDefaultShadowEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDefaultShadowEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDefaultShadowEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDefaultShadowEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::FlyoutPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics>
    {
        int32_t __stdcall get_IsDefaultShadowEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDefaultShadowEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FlyoutPresenterStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FlyoutPresenterStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFocusDisengagedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFocusDisengagedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs>
    {
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon>
    {
        int32_t __stdcall get_Glyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Glyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Glyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Glyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeft(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MirroredWhenRightToLeft());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MirroredWhenRightToLeft(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MirroredWhenRightToLeft(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::FontIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource>
    {
        int32_t __stdcall get_Glyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Glyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Glyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Glyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeft(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().MirroredWhenRightToLeft());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MirroredWhenRightToLeft(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MirroredWhenRightToLeft(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::FontIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics>
    {
        int32_t __stdcall get_GlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MirroredWhenRightToLeftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics>
    {
        int32_t __stdcall get_GlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MirroredWhenRightToLeftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MirroredWhenRightToLeftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFrame> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>
    {
        int32_t __stdcall get_CacheSize(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CacheSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CacheSize(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CacheSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoBack(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanGoBack());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoForward(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanGoForward());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentSourcePageType(struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Xaml::Interop::TypeName>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Xaml::Interop::TypeName>(this->shim().CurrentSourcePageType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourcePageType(struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Xaml::Interop::TypeName>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Xaml::Interop::TypeName>(this->shim().SourcePageType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SourcePageType(struct struct_Windows_UI_Xaml_Interop_TypeName value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SourcePageType(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackStackDepth(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().BackStackDepth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackStack(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Navigation::PageStackEntry>>(this->shim().BackStack());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForwardStack(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Navigation::PageStackEntry>>(this->shim().ForwardStack());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsNavigationStackEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsNavigationStackEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsNavigationStackEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsNavigationStackEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Navigated(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Navigated(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigatedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Navigated(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Navigated(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Navigating(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Navigating(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Navigating(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Navigating(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_NavigationFailed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().NavigationFailed(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_NavigationFailed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigationFailed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_NavigationStopped(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().NavigationStopped(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigationStoppedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_NavigationStopped(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigationStopped(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall GoBack() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GoBack();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GoBackWithTransitionInfo(void* transitionInfoOverride) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GoBack(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo const*>(&transitionInfoOverride));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GoForward() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GoForward();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Navigate(struct struct_Windows_UI_Xaml_Interop_TypeName sourcePageType, void* parameter, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().Navigate(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&sourcePageType), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&parameter)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall NavigateWithTransitionInfo(struct struct_Windows_UI_Xaml_Interop_TypeName sourcePageType, void* parameter, void* infoOverride, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().Navigate(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&sourcePageType), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&parameter), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo const*>(&infoOverride)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall NavigateToType(struct struct_Windows_UI_Xaml_Interop_TypeName sourcePageType, void* parameter, void* navigationOptions, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().NavigateToType(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&sourcePageType), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&parameter), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::FrameNavigationOptions const*>(&navigationOptions)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetNavigationState(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().GetNavigationState());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetNavigationState(void* navigationState) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetNavigationState(*reinterpret_cast<hstring const*>(&navigationState));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetNavigationStateWithNavigationControl(void* navigationState, bool suppressNavigate) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetNavigationState(*reinterpret_cast<hstring const*>(&navigationState), suppressNavigate);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFrameFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFrameFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Frame>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IFrameStatics>
    {
        int32_t __stdcall get_CacheSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CacheSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoBackProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanGoBackProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoForwardProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanGoForwardProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentSourcePageTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CurrentSourcePageTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourcePageTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourcePageTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackStackDepthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackStackDepthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackStackProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackStackProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForwardStackProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForwardStackProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsNavigationStackEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsNavigationStackEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGrid> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGrid>
    {
        int32_t __stdcall get_RowDefinitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RowDefinitionCollection>(this->shim().RowDefinitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnDefinitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColumnDefinitionCollection>(this->shim().ColumnDefinitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RowSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().RowSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RowSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RowSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ColumnSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ColumnSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ColumnSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Grid>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridStatics>
    {
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RowSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RowSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColumnSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRow(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetRow(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetRow(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetRow(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColumnProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetColumn(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetColumn(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetColumn(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetColumn(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RowSpanProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RowSpanProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRowSpan(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetRowSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetRowSpan(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetRowSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnSpanProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColumnSpanProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetColumnSpan(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetColumnSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetColumnSpan(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetColumnSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridView>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GridView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GridViewHeaderItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItem>
    {
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GridViewItemTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GridViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle>
    {
        int32_t __stdcall get_Panel(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate>(this->shim().Panel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Panel(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Panel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContainerStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().ContainerStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContainerStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContainerStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderContainerStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().HeaderContainerStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderContainerStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderContainerStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContainerStyleSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StyleSelector>(this->shim().ContainerStyleSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContainerStyleSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContainerStyleSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().HeaderTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HidesIfEmpty(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HidesIfEmpty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HidesIfEmpty(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HidesIfEmpty(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupStyle>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector>
    {
        int32_t __stdcall SelectGroupStyle(void* group, uint32_t level, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupStyle>(this->shim().SelectGroupStyle(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&group), level));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>
    {
        int32_t __stdcall SelectGroupStyleCore(void* group, uint32_t level, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupStyle>(this->shim().SelectGroupStyleCore(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&group), level));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs>
    {
        int32_t __stdcall get_NewValue(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().NewValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHub> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHub>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultSectionIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().DefaultSectionIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultSectionIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultSectionIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Sections(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>>(this->shim().Sections());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SectionsInView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>>(this->shim().SectionsInView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SectionHeaders(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Windows::Foundation::IInspectable>>(this->shim().SectionHeaders());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SectionHeaderClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SectionHeaderClick(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SectionHeaderClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SectionHeaderClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SectionsInViewChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SectionsInViewChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SectionsInViewChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SectionsInViewChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ScrollToSection(void* section) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollToSection(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::HubSection const*>(&section));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Hub>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHeaderInteractive(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHeaderInteractive());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHeaderInteractive(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHeaderInteractive(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::HubSection>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs>
    {
        int32_t __stdcall get_Section(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::HubSection>(this->shim().Section());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHeaderInteractiveProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHeaderInteractiveProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHubStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultSectionIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultSectionIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SemanticZoomOwnerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SemanticZoomOwnerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsActiveViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsActiveViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomedInViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomedInViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton>
    {
        int32_t __stdcall get_NavigateUri(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().NavigateUri());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NavigateUri(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigateUri(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::HyperlinkButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics>
    {
        int32_t __stdcall get_NavigateUriProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NavigateUriProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconElement> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconElement>
    {
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconElementFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconElementFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics>
    {
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSource>
    {
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateIconElement(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().CreateIconElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement>
    {
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSourceElement>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics>
    {
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceFactory>
    {
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>
    {
        int32_t __stdcall CreateIconElementCore(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().CreateIconElementCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIconElementPropertyCore(void* iconSourceProperty, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GetIconElementPropertyCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyProperty const*>(&iconSourceProperty)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics>
    {
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImage> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImage>
    {
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Stretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Stretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Stretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NineGrid(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().NineGrid());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NineGrid(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NineGrid(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ImageFailed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ImageFailed(*reinterpret_cast<winrt::Microsoft::UI::Xaml::ExceptionRoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ImageFailed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ImageFailed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ImageOpened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ImageOpened(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ImageOpened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ImageOpened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall GetAsCastingSource(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Media::Casting::CastingSource>(this->shim().GetAsCastingSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlphaMask(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Composition::CompositionBrush>(this->shim().GetAlphaMask());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIcon>
    {
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ImageIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSource>
    {
        int32_t __stdcall get_ImageSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().ImageSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ImageSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ImageSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ImageIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics>
    {
        int32_t __stdcall get_ImageSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ImageSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics>
    {
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IImageStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IImageStatics>
    {
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NineGridProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NineGridProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge>
    {
        int32_t __stdcall get_Value(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Value(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBadgeTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBadge>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics>
    {
        int32_t __stdcall get_ValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings>
    {
        int32_t __stdcall get_InfoBadgeCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().InfoBadgeCornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InfoBadgeCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InfoBadgeCornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().IconElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBadgeTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics>
    {
        int32_t __stdcall get_InfoBadgeCornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InfoBadgeCornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconElementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar>
    {
        int32_t __stdcall get_IsOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Message(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Message());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Message(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Message(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Severity(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBarSeverity>(this->shim().Severity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Severity(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Severity(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::InfoBarSeverity const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsIconVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsIconVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsIconVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsIconVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClosable(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsClosable());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsClosable(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsClosable(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CloseButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().CloseButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CloseButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButton(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase>(this->shim().ActionButton());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ActionButton(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButton(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBarTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CloseButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CloseButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CloseButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::InfoBar, winrt::Microsoft::UI::Xaml::Controls::InfoBarClosedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs>
    {
        int32_t __stdcall get_Reason(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBarCloseReason>(this->shim().Reason());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgsFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs>
    {
        int32_t __stdcall get_Reason(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBarCloseReason>(this->shim().Reason());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgsFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics>
    {
        int32_t __stdcall get_IsOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MessageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MessageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SeverityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SeverityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsIconVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsIconVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClosableProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsClosableProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActionButtonProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings>
    {
        int32_t __stdcall get_IconElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().IconElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBarTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics>
    {
        int32_t __stdcall get_IconElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconElementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel>
    {
        int32_t __stdcall GetInsertionIndexes(winrt::Windows::Foundation::Point position, int32_t* first, int32_t* second) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GetInsertionIndexes(*reinterpret_cast<winrt::Windows::Foundation::Point const*>(&position), *first, *second);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IIsTextTrimmedChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IIsTextTrimmedChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs>
    {
        int32_t __stdcall get_ClickedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ClickedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition>
    {
        int32_t __stdcall get_Operation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionOperation>(this->shim().Operation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Triggers(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionTriggers>(this->shim().Triggers());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OldBounds(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().OldBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewBounds(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().NewBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasStarted(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasStarted());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Start(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProgress>(this->shim().Start());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs>
    {
        int32_t __stdcall get_Transition(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition>(this->shim().Transition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress>
    {
        int32_t __stdcall get_Transition(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition>(this->shim().Transition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Complete() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Complete();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>
    {
        int32_t __stdcall ShouldAnimate(void* transition, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ShouldAnimate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const*>(&transition)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall QueueTransition(void* transition) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().QueueTransition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const*>(&transition));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TransitionCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TransitionCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider, winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TransitionCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TransitionCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>
    {
        int32_t __stdcall ShouldAnimateCore(void* transition, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ShouldAnimateCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const*>(&transition)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall StartTransitions(void* transitions) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StartTransitions(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition> const*>(&transitions));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer>
    {
        int32_t __stdcall get_Child(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Child());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Child(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Child(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSelected(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSelected());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSelected(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSelected(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemContainer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator>
    {
        int32_t __stdcall add_ItemsChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemsChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ItemFromContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexFromContainer(void* container, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetItemContainerGeneratorForPanel(void* panel, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator>(this->shim().GetItemContainerGeneratorForPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Panel const*>(&panel)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall StartAt(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition position, int32_t direction, bool allowStartAtRealizedItem) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StartAt(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const*>(&position), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorDirection const*>(&direction), allowStartAtRealizedItem);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Stop() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stop();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GenerateNext(bool* isNewlyRealized, void** returnValue) noexcept final try
        {
            clear_abi(returnValue);
            typename D::abi_guard guard(this->shim());
            *returnValue = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().GenerateNext(*isNewlyRealized));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PrepareItemContainer(void* container) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrepareItemContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RemoveAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RemoveAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Remove(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition position, int32_t count) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Remove(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const*>(&position), count);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GeneratorPositionFromIndex(int32_t itemIndex, struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition* result) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(this->shim().GeneratorPositionFromIndex(itemIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexFromGeneratorPosition(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition position, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexFromGeneratorPosition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const*>(&position)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Recycle(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition position, int32_t count) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Recycle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition const*>(&position), count);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping>
    {
        int32_t __stdcall ItemFromContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexFromContainer(void* container, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics>
    {
        int32_t __stdcall get_ChildProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ChildProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSelectedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSelectedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollection>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().ItemTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsPanel(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate>(this->shim().ItemsPanel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsPanel(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMemberPath(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DisplayMemberPath());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayMemberPath(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayMemberPath(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsPanelRoot(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Panel>(this->shim().ItemsPanelRoot());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().ItemContainerStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StyleSelector>(this->shim().ItemContainerStyleSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerStyleSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerStyleSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerGenerator(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator>(this->shim().ItemContainerGenerator());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ItemContainerTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IObservableVector<winrt::Microsoft::UI::Xaml::Controls::GroupStyle>>(this->shim().GroupStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupStyleSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector>(this->shim().GroupStyleSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupStyleSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupStyleSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGrouping(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsGrouping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GroupHeaderContainerFromItemContainer(void* itemContainer, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().GroupHeaderContainerFromItemContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&itemContainer)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>
    {
        int32_t __stdcall IsItemItsOwnContainerOverride(void* item, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsItemItsOwnContainerOverride(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetContainerForItemOverride(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().GetContainerForItemOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ClearContainerForItemOverride(void* element, void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClearContainerForItemOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PrepareContainerForItemOverride(void* element, void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PrepareContainerForItemOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemsChanged(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemsChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemContainerStyleChanged(void* oldItemContainerStyle, void* newItemContainerStyle) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemContainerStyleChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&oldItemContainerStyle), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&newItemContainerStyle));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemContainerStyleSelectorChanged(void* oldItemContainerStyleSelector, void* newItemContainerStyleSelector) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemContainerStyleSelectorChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&oldItemContainerStyleSelector), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&newItemContainerStyleSelector));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemTemplateChanged(void* oldItemTemplate, void* newItemTemplate) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemTemplateChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&oldItemTemplate), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&newItemTemplate));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemTemplateSelectorChanged(void* oldItemTemplateSelector, void* newItemTemplateSelector) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemTemplateSelectorChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&oldItemTemplateSelector), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&newItemTemplateSelector));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnGroupStyleSelectorChanged(void* oldGroupStyleSelector, void* newGroupStyleSelector) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnGroupStyleSelectorChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const*>(&oldGroupStyleSelector), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const*>(&newGroupStyleSelector));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics>
    {
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMemberPathProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayMemberPathProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerStyleSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupStyleSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupStyleSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsGroupingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetItemsOwner(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsControl>(this->shim().GetItemsOwner(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ItemsControlFromItemContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsControl>(this->shim().ItemsControlFromItemContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPanelTemplate> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPanelTemplate>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs>
    {
        int32_t __stdcall get_AddedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().AddedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RemovedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().RemovedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().HeaderTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Footer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Footer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Footer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Footer(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().FooterTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FooterTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FooterTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().FooterTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FooterTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FooterTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSourceView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsSourceView>(this->shim().ItemsSourceView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Layout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Layout>(this->shim().Layout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Layout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Layout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Layout const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalCacheLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalCacheLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalCacheLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalCacheLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalCacheLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalCacheLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalCacheLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalCacheLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetElementIndex(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetElementIndex(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall TryGetElement(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().TryGetElement(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetOrCreateElement(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().GetOrCreateElement(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ElementPrepared(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ElementPrepared(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementPreparedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ElementPrepared(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ElementPrepared(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ElementClearing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ElementClearing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementClearingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ElementClearing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ElementClearing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ElementIndexChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ElementIndexChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementIndexChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ElementIndexChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ElementIndexChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2>
    {
        int32_t __stdcall get_ItemTransitionProvider(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider>(this->shim().ItemTransitionProvider());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTransitionProvider(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTransitionProvider(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs>
    {
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs>
    {
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OldIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().OldIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().NewIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs>
    {
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Index(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Index());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost>
    {
        int32_t __stdcall get_ScrollViewer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer>(this->shim().ScrollViewer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ScrollViewer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollViewer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentAnchor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().CurrentAnchor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics>
    {
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LayoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalCacheLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalCacheLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalCacheLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalCacheLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2>
    {
        int32_t __stdcall get_ItemTransitionProviderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTransitionProviderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView>
    {
        int32_t __stdcall get_Count(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Count());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAt(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAt(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasKeyIndexMapping(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasKeyIndexMapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall KeyFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().KeyFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexFromKey(void* key, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexFromKey(*reinterpret_cast<hstring const*>(&key)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexOf(void* item, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexOf(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory>
    {
        int32_t __stdcall CreateInstance(void* source, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsSourceView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&source), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel>
    {
        int32_t __stdcall get_GroupPadding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().GroupPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupPadding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstCacheIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().FirstCacheIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstVisibleIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().FirstVisibleIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastVisibleIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().LastVisibleIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastCacheIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().LastCacheIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollingDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PanelScrollingDirection>(this->shim().ScrollingDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupHeaderPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement>(this->shim().GroupHeaderPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupHeaderPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupHeaderPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsUpdatingScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsUpdatingScrollMode>(this->shim().ItemsUpdatingScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsUpdatingScrollMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsUpdatingScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemsUpdatingScrollMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CacheLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CacheLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CacheLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CacheLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreStickyGroupHeadersEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreStickyGroupHeadersEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreStickyGroupHeadersEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreStickyGroupHeadersEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics>
    {
        int32_t __stdcall get_GroupPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupHeaderPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupHeaderPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CacheLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CacheLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreStickyGroupHeadersEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreStickyGroupHeadersEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollView>(this->shim().ScrollView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollController(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>(this->shim().VerticalScrollController());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollController(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollController(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::IElementFactory>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::IElementFactory const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Layout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Layout>(this->shim().Layout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Layout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Layout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Layout const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsItemInvokedEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsItemInvokedEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsItemInvokedEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsItemInvokedEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTransitionProvider(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider>(this->shim().ItemTransitionProvider());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTransitionProvider(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTransitionProvider(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentItemIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CurrentItemIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>>(this->shim().SelectedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall TryGetItemIndex(double horizontalViewportRatio, double verticalViewportRatio, int32_t* index, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().TryGetItemIndex(horizontalViewportRatio, verticalViewportRatio, *index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall StartBringItemIntoView(int32_t index, void* options) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StartBringItemIntoView(index, *reinterpret_cast<winrt::Microsoft::UI::Xaml::BringIntoViewOptions const*>(&options));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Select(int32_t itemIndex) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Select(itemIndex);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Deselect(int32_t itemIndex) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Deselect(itemIndex);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IsSelected(int32_t itemIndex, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsSelected(itemIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DeselectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DeselectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InvertSelection() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvertSelection();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ItemInvoked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemInvoked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewItemInvokedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemInvoked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemInvoked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ItemsView, winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs>
    {
        int32_t __stdcall get_InvokedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().InvokedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewSelectionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewSelectionChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics>
    {
        int32_t __stdcall get_IsItemInvokedEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsItemInvokedEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LayoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTransitionProviderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTransitionProviderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentItemIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CurrentItemIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ScrollViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollControllerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollControllerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid>
    {
        int32_t __stdcall get_GroupPadding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().GroupPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupPadding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumns(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaximumRowsOrColumns());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaximumRowsOrColumns(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaximumRowsOrColumns(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstCacheIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().FirstCacheIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FirstVisibleIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().FirstVisibleIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastVisibleIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().LastVisibleIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LastCacheIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().LastCacheIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollingDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PanelScrollingDirection>(this->shim().ScrollingDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupHeaderPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement>(this->shim().GroupHeaderPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupHeaderPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupHeaderPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::GroupHeaderPlacement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CacheLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CacheLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CacheLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CacheLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreStickyGroupHeadersEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreStickyGroupHeadersEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreStickyGroupHeadersEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreStickyGroupHeadersEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemsWrapGrid>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics>
    {
        int32_t __stdcall get_GroupPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumnsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumRowsOrColumnsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupHeaderPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupHeaderPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CacheLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CacheLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreStickyGroupHeadersEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreStickyGroupHeadersEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping>
    {
        int32_t __stdcall KeyFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().KeyFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IndexFromKey(void* key, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().IndexFromKey(*reinterpret_cast<hstring const*>(&key)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayout>
    {
        int32_t __stdcall InitializeForContext(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InitializeForContext(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall UninitializeForContext(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UninitializeForContext(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Measure(void* context, winrt::Windows::Foundation::Size availableSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().Measure(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&availableSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Arrange(void* context, winrt::Windows::Foundation::Size finalSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().Arrange(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&finalSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_MeasureInvalidated(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().MeasureInvalidated(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_MeasureInvalidated(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MeasureInvalidated(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ArrangeInvalidated(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ArrangeInvalidated(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ArrangeInvalidated(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ArrangeInvalidated(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayout2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayout2>
    {
        int32_t __stdcall get_IndexBasedLayoutOrientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation>(this->shim().IndexBasedLayoutOrientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext>
    {
        int32_t __stdcall get_LayoutState(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().LayoutState());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LayoutState(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LayoutState(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextFactory>
    {
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>
    {
        int32_t __stdcall get_LayoutStateCore(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().LayoutStateCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LayoutStateCore(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LayoutStateCore(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutFactory>
    {
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>
    {
        int32_t __stdcall CreateDefaultItemTransitionProvider(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider>(this->shim().CreateDefaultItemTransitionProvider());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>
    {
        int32_t __stdcall InvalidateMeasure() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvalidateMeasure();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InvalidateArrange() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvalidateArrange();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>
    {
        int32_t __stdcall SetIndexBasedLayoutOrientation(int32_t orientation) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIndexBasedLayoutOrientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation const*>(&orientation));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout>
    {
        int32_t __stdcall add_ItemsInfoRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemsInfoRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsInfoRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemsInfoRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsInfoRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ItemsUnlocked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemsUnlocked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemsUnlocked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsUnlocked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_ItemsJustification(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification>(this->shim().ItemsJustification());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsJustification(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsJustification(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch>(this->shim().ItemsStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsStretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinItemSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinItemSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinItemSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LineSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LineHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualLineHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ActualLineHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequestedRangeStartIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().RequestedRangeStartIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequestedRangeLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().RequestedRangeLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InvalidateItemsInfo() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvalidateItemsInfo();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LockItemToLine(int32_t itemIndex, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().LockItemToLine(itemIndex));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProvider> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProvider>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemCollectionTransitionProvider>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs>
    {
        int32_t __stdcall get_ItemsRangeStartIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemsRangeStartIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsRangeStartIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsRangeStartIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsRangeRequestedLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemsRangeRequestedLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetDesiredAspectRatios(uint32_t __valuesSize, double* values) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDesiredAspectRatios(array_view<double const>(reinterpret_cast<double const *>(values), reinterpret_cast<double const *>(values) + __valuesSize));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetMinWidths(uint32_t __valuesSize, double* values) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetMinWidths(array_view<double const>(reinterpret_cast<double const *>(values), reinterpret_cast<double const *>(values) + __valuesSize));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetMaxWidths(uint32_t __valuesSize, double* values) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetMaxWidths(array_view<double const>(reinterpret_cast<double const *>(values), reinterpret_cast<double const *>(values) + __valuesSize));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics>
    {
        int32_t __stdcall get_ItemsJustificationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsJustificationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinItemSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualLineHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActualLineHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListBox>
    {
        int32_t __stdcall get_SelectedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().SelectedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SingleSelectionFollowsFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SingleSelectionFollowsFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SingleSelectionFollowsFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollIntoView(void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollIntoView(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListBoxItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics>
    {
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SingleSelectionFollowsFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMemberPath(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DisplayMemberPath());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayMemberPath(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayMemberPath(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyoutSelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyoutSelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectedIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedValue(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedValue(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedValue(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedValuePath(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SelectedValuePath());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedValuePath(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedValuePath(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().SelectedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ItemsPicked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemsPicked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyout, winrt::Microsoft::UI::Xaml::Controls::ItemsPickedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemsPicked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsPicked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ShowAtAsync(void* target, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>>>(this->shim().ShowAtAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&target)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutPresenter>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics>
    {
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMemberPathProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayMemberPathProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedValuePathProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedValuePathProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListView>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase>
    {
        int32_t __stdcall get_SelectedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().SelectedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewSelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewSelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSwipeEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSwipeEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSwipeEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSwipeEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanDragItems(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanDragItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanDragItems(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanDragItems(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderItems(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanReorderItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanReorderItems(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanReorderItems(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsItemClickEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsItemClickEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsItemClickEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsItemClickEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DataFetchSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DataFetchSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DataFetchSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DataFetchSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalLoadingThreshold(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().IncrementalLoadingThreshold());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IncrementalLoadingThreshold(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IncrementalLoadingThreshold(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalLoadingTrigger(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IncrementalLoadingTrigger>(this->shim().IncrementalLoadingTrigger());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IncrementalLoadingTrigger(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IncrementalLoadingTrigger(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IncrementalLoadingTrigger const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowsScrollingPlaceholders(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowsScrollingPlaceholders());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowsScrollingPlaceholders(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowsScrollingPlaceholders(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewReorderMode>(this->shim().ReorderMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ReorderMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ReorderMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewReorderMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedRanges(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::Data::ItemIndexRange>>(this->shim().SelectedRanges());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsMultiSelectCheckBoxEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsMultiSelectCheckBoxEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsMultiSelectCheckBoxEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsMultiSelectCheckBoxEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SingleSelectionFollowsFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SingleSelectionFollowsFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SingleSelectionFollowsFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ItemClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemClick(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DragItemsStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DragItemsStarting(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragItemsStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragItemsStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DragItemsCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DragItemsCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragItemsCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragItemsCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContainerContentChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContainerContentChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContainerContentChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContainerContentChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ChoosingItemContainer(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ChoosingItemContainer(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingItemContainerEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ChoosingItemContainer(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ChoosingItemContainer(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ChoosingGroupHeaderContainer(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ChoosingGroupHeaderContainer(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::ChoosingGroupHeaderContainerEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ChoosingGroupHeaderContainer(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ChoosingGroupHeaderContainer(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ScrollIntoView(void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollIntoView(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LoadMoreItemsAsync(void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::UI::Xaml::Data::LoadMoreItemsResult>>(this->shim().LoadMoreItemsAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollIntoViewWithAlignment(void* item, int32_t alignment) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollIntoView(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollIntoViewAlignment const*>(&alignment));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetDesiredContainerUpdateDuration(int64_t duration) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDesiredContainerUpdateDuration(*reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(&duration));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectRange(void* itemIndexRange) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectRange(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Data::ItemIndexRange const*>(&itemIndexRange));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall DeselectRange(void* itemIndexRange) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DeselectRange(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Data::ItemIndexRange const*>(&itemIndexRange));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall IsDragSource(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().IsDragSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall TryStartConnectedAnimationAsync(void* animation, void* item, void* elementName, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(this->shim().TryStartConnectedAnimationAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::ConnectedAnimation const*>(&animation), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<hstring const*>(&elementName)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PrepareConnectedAnimation(void* key, void* item, void* elementName, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::ConnectedAnimation>(this->shim().PrepareConnectedAnimation(*reinterpret_cast<hstring const*>(&key), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<hstring const*>(&elementName)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().HeaderTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Footer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Footer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Footer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Footer(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().FooterTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FooterTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FooterTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().FooterTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FooterTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FooterTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewBase>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItemFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics>
    {
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSwipeEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSwipeEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanDragItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanDragItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanReorderItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsItemClickEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsItemClickEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DataFetchSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DataFetchSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalLoadingThresholdProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IncrementalLoadingThresholdProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IncrementalLoadingTriggerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IncrementalLoadingTriggerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowsScrollingPlaceholdersProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowsScrollingPlaceholdersProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReorderModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsMultiSelectCheckBoxEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsMultiSelectCheckBoxEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SingleSelectionFollowsFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SemanticZoomOwnerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SemanticZoomOwnerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsActiveViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsActiveViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomedInViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomedInViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewHeaderItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItem>
    {
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ListViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelper> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelper>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics>
    {
        int32_t __stdcall GetRelativeScrollPosition(void* listViewBase, void* itemToKeyHandler, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().GetRelativeScrollPosition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewBase const*>(&listViewBase), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler const*>(&itemToKeyHandler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetRelativeScrollPositionAsync(void* listViewBase, void* relativeScrollPosition, void* keyToItemHandler, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().SetRelativeScrollPositionAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewBase const*>(&listViewBase), *reinterpret_cast<hstring const*>(&relativeScrollPosition), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler const*>(&keyToItemHandler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl>
    {
        int32_t __stdcall get_MapServiceToken(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().MapServiceToken());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MapServiceToken(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MapServiceToken(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Center(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::Geolocation::Geopoint>(this->shim().Center());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Center(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Center(*reinterpret_cast<winrt::Windows::Devices::Geolocation::Geopoint const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Layers(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapLayer>>(this->shim().Layers());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Layers(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Layers(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapLayer> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomLevel(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ZoomLevel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomLevel(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomLevel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InteractiveControlsVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().InteractiveControlsVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InteractiveControlsVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InteractiveControlsVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_MapElementClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().MapElementClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_MapElementClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MapElementClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_MapServiceErrorOccurred(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().MapServiceErrorOccurred(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapControl, winrt::Microsoft::UI::Xaml::Controls::MapControlMapServiceErrorOccurredEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_MapServiceErrorOccurred(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MapServiceErrorOccurred(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MapControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs>
    {
        int32_t __stdcall get_DiagnosticMessage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DiagnosticMessage());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics>
    {
        int32_t __stdcall get_LayersProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LayersProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MapServiceTokenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MapServiceTokenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CenterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CenterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomLevelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomLevelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InteractiveControlsVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InteractiveControlsVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElement> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElement>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs>
    {
        int32_t __stdcall get_Location(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::Geolocation::Geopoint>(this->shim().Location());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Element(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MapElement>(this->shim().Element());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer>
    {
        int32_t __stdcall get_MapElements(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapElement>>(this->shim().MapElements());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MapElements(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MapElements(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MapElement> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_MapElementClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().MapElementClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer, winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_MapElementClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MapElementClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics>
    {
        int32_t __stdcall get_MapElementsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MapElementsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapIcon>
    {
        int32_t __stdcall get_Location(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::Geolocation::Geopoint>(this->shim().Location());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Location(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Location(*reinterpret_cast<winrt::Windows::Devices::Geolocation::Geopoint const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MapIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics>
    {
        int32_t __stdcall get_LocationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LocationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapLayer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapLayer>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMapLayerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMapLayerFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement>
    {
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Media::Playback::IMediaPlaybackSource>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Windows::Media::Playback::IMediaPlaybackSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TransportControls(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls>(this->shim().TransportControls());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TransportControls(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TransportControls(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreTransportControlsEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreTransportControlsEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreTransportControlsEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreTransportControlsEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PosterSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().PosterSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PosterSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PosterSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Stretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Stretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Stretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoPlay(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AutoPlay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AutoPlay(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AutoPlay(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFullWindow(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFullWindow());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFullWindow(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFullWindow(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MediaPlayer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Media::Playback::MediaPlayer>(this->shim().MediaPlayer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetMediaPlayer(void* mediaPlayer) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetMediaPlayer(*reinterpret_cast<winrt::Windows::Media::Playback::MediaPlayer const*>(&mediaPlayer));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MediaPlayerElement>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics>
    {
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreTransportControlsEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreTransportControlsEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PosterSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PosterSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoPlayProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AutoPlayProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFullWindowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFullWindowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MediaPlayerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MediaPlayerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter>
    {
        int32_t __stdcall get_MediaPlayer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Media::Playback::MediaPlayer>(this->shim().MediaPlayer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MediaPlayer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MediaPlayer(*reinterpret_cast<winrt::Windows::Media::Playback::MediaPlayer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Stretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Stretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Stretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFullWindow(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFullWindow());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFullWindow(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFullWindow(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MediaPlayerPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics>
    {
        int32_t __stdcall get_MediaPlayerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MediaPlayerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFullWindowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFullWindowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls>
    {
        int32_t __stdcall get_IsZoomButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastForwardButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFastForwardButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFastForwardButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFastForwardButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastForwardEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFastForwardEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFastForwardEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFastForwardEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastRewindButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFastRewindButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFastRewindButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFastRewindButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastRewindEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsFastRewindEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsFastRewindEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsFastRewindEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsStopButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsStopButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsStopButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsStopButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsStopEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsStopEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsStopEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsStopEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVolumeButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsVolumeButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsVolumeButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsVolumeButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVolumeEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsVolumeEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsVolumeEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsVolumeEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlaybackRateButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPlaybackRateButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPlaybackRateButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPlaybackRateButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlaybackRateEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPlaybackRateEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPlaybackRateEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPlaybackRateEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSeekBarVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSeekBarVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSeekBarVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSeekBarVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSeekEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSeekEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSeekEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSeekEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCompact(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsCompact());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsCompact(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsCompact(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipForwardButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSkipForwardButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSkipForwardButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSkipForwardButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipForwardEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSkipForwardEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSkipForwardEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSkipForwardEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipBackwardButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSkipBackwardButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSkipBackwardButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSkipBackwardButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipBackwardEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSkipBackwardEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSkipBackwardEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSkipBackwardEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsNextTrackButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsNextTrackButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsNextTrackButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsNextTrackButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPreviousTrackButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPreviousTrackButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPreviousTrackButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPreviousTrackButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FastPlayFallbackBehaviour(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FastPlayFallbackBehaviour>(this->shim().FastPlayFallbackBehaviour());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FastPlayFallbackBehaviour(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FastPlayFallbackBehaviour(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FastPlayFallbackBehaviour const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAndHideAutomatically(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowAndHideAutomatically());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowAndHideAutomatically(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAndHideAutomatically(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsRepeatEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsRepeatEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsRepeatEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsRepeatEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsRepeatButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsRepeatButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsRepeatButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsRepeatButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ThumbnailRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ThumbnailRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls, winrt::Microsoft::UI::Xaml::Media::MediaTransportControlsThumbnailRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ThumbnailRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ThumbnailRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall Show() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Show();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Hide() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Hide();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelper> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelper>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics>
    {
        int32_t __stdcall get_DropoutOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DropoutOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetDropoutOrder(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IReference<int32_t>>(this->shim().GetDropoutOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetDropoutOrder(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetDropoutOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IReference<int32_t> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics>
    {
        int32_t __stdcall get_IsZoomButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastForwardButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFastForwardButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastForwardEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFastForwardEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastRewindButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFastRewindButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsFastRewindEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsFastRewindEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsStopButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsStopButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsStopEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsStopEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVolumeButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVolumeButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVolumeEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVolumeEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlaybackRateButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPlaybackRateButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPlaybackRateEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPlaybackRateEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSeekBarVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSeekBarVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSeekEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSeekEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsCompactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCompactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipForwardButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSkipForwardButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipForwardEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSkipForwardEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipBackwardButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSkipBackwardButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSkipBackwardEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSkipBackwardEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsNextTrackButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsNextTrackButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPreviousTrackButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPreviousTrackButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FastPlayFallbackBehaviourProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FastPlayFallbackBehaviourProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowAndHideAutomaticallyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowAndHideAutomaticallyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsRepeatEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsRepeatEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsRepeatButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsRepeatButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBar>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem>
    {
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyout>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuBarItemFlyout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics>
    {
        int32_t __stdcall get_TitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics>
    {
        int32_t __stdcall get_ItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuFlyoutPresenterStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().MenuFlyoutPresenterStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuFlyoutPresenterStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuFlyoutPresenterStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShowAt(void* targetElement, winrt::Windows::Foundation::Point point) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAt(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&targetElement), *reinterpret_cast<winrt::Windows::Foundation::Point const*>(&point));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuFlyout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem>
    {
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Command(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().Command());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Command(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Command(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverride(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().KeyboardAcceleratorTextOverride());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_KeyboardAcceleratorTextOverride(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().KeyboardAcceleratorTextOverride(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutItemTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Click(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Click(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Click(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Click(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBaseFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics>
    {
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KeyboardAcceleratorTextOverrideProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().KeyboardAcceleratorTextOverrideProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter>
    {
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutPresenterTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDefaultShadowEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDefaultShadowEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDefaultShadowEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDefaultShadowEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2>
    {
        int32_t __stdcall get_SystemBackdrop(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SystemBackdrop>(this->shim().SystemBackdrop());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SystemBackdrop(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SystemBackdrop(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SystemBackdrop const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics>
    {
        int32_t __stdcall get_IsDefaultShadowEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDefaultShadowEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2>
    {
        int32_t __stdcall get_SystemBackdropProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SystemBackdropProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparator> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparator>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSeparator>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics>
    {
        int32_t __stdcall get_MenuFlyoutPresenterStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuFlyoutPresenterStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics>
    {
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigate> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigate>
    {
        int32_t __stdcall Navigate(struct struct_Windows_UI_Xaml_Interop_TypeName sourcePageType, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().Navigate(*reinterpret_cast<winrt::Windows::UI::Xaml::Interop::TypeName const*>(&sourcePageType)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView>
    {
        int32_t __stdcall get_IsPaneOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPaneOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPaneOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPaneOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactModeThresholdWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CompactModeThresholdWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CompactModeThresholdWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompactModeThresholdWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandedModeThresholdWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandedModeThresholdWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ExpandedModeThresholdWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExpandedModeThresholdWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterMenuItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().FooterMenuItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterMenuItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().FooterMenuItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FooterMenuItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FooterMenuItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneFooter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().PaneFooter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneFooter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneFooter(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode>(this->shim().DisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSettingsVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSettingsVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSettingsVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSettingsVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneToggleButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPaneToggleButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPaneToggleButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPaneToggleButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlwaysShowHeader(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AlwaysShowHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AlwaysShowHeader(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AlwaysShowHeader(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CompactPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CompactPaneLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompactPaneLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpenPaneLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpenPaneLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().PaneToggleButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneToggleButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneToggleButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().MenuItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().MenuItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SettingsItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SettingsItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoSuggestBox(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox>(this->shim().AutoSuggestBox());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AutoSuggestBox(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AutoSuggestBox(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().MenuItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().MenuItemTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemContainerStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().MenuItemContainerStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemContainerStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemContainerStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemContainerStyleSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StyleSelector>(this->shim().MenuItemContainerStyleSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemContainerStyleSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemContainerStyleSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MenuItemFromContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().MenuItemFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromMenuItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromMenuItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ItemInvoked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemInvoked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemInvoked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemInvoked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DisplayModeChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DisplayModeChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayModeChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DisplayModeChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayModeChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_IsTitleBarAutoPaddingEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTitleBarAutoPaddingEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTitleBarAutoPaddingEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTitleBarAutoPaddingEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView2>
    {
        int32_t __stdcall get_IsBackButtonVisible(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible>(this->shim().IsBackButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsBackButtonVisible(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsBackButtonVisible(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsBackEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsBackEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsBackEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsBackEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneTitle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PaneTitle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneTitle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneTitle(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_BackRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().BackRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_BackRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneClosed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneClosed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneClosed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneClosed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneClosing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneClosing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneClosingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneClosing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneClosing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneOpened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneOpened(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneOpened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneOpened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneOpening(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_PaneDisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode>(this->shim().PaneDisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneDisplayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneDisplayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().PaneHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneHeader(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneCustomContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().PaneCustomContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneCustomContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneCustomContent(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentOverlay(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().ContentOverlay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentOverlay(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentOverlay(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPaneVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPaneVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPaneVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFollowsFocus(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus>(this->shim().SelectionFollowsFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFollowsFocus(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFollowsFocus(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShoulderNavigationEnabled(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled>(this->shim().ShoulderNavigationEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShoulderNavigationEnabled(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShoulderNavigationEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowLabelMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode>(this->shim().OverflowLabelMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OverflowLabelMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OverflowLabelMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Expanding(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Expanding(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemExpandingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Expanding(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Expanding(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Collapsed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Collapsed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NavigationView, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemCollapsedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Collapsed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Collapsed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall Expand(void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Expand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Collapse(void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Collapse(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewBackRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewBackRequestedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs>
    {
        int32_t __stdcall get_DisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode>(this->shim().DisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem>
    {
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CompactPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2>
    {
        int32_t __stdcall get_SelectsOnInvoked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SelectsOnInvoked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectsOnInvoked(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectsOnInvoked(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpanded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsExpanded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsExpanded(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsExpanded(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasUnrealizedChildren(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasUnrealizedChildren());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HasUnrealizedChildren(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HasUnrealizedChildren(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsChildSelected(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsChildSelected());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsChildSelected(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsChildSelected(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().MenuItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().MenuItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MenuItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MenuItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3>
    {
        int32_t __stdcall get_InfoBadge(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::InfoBadge>(this->shim().InfoBadge());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InfoBadge(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InfoBadge(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::InfoBadge const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2>
    {
        int32_t __stdcall get_IsSelected(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSelected());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSelected(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSelected(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics>
    {
        int32_t __stdcall get_IsSelectedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSelectedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs>
    {
        int32_t __stdcall get_CollapsedItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase>(this->shim().CollapsedItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CollapsedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CollapsedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs>
    {
        int32_t __stdcall get_ExpandingItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase>(this->shim().ExpandingItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandingItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ExpandingItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeader> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeader>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemHeader>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs>
    {
        int32_t __stdcall get_InvokedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().InvokedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSettingsInvoked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSettingsInvoked());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2>
    {
        int32_t __stdcall get_InvokedItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase>(this->shim().InvokedItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RecommendedNavigationTransitionInfo(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>(this->shim().RecommendedNavigationTransitionInfo());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparator> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparator>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemSeparator>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics>
    {
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompactPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2>
    {
        int32_t __stdcall get_SelectsOnInvokedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectsOnInvokedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpandedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsExpandedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasUnrealizedChildrenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HasUnrealizedChildrenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsChildSelectedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsChildSelectedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3>
    {
        int32_t __stdcall get_InfoBadgeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InfoBadgeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs>
    {
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSettingsSelected(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSettingsSelected());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2>
    {
        int32_t __stdcall get_SelectedItemContainer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase>(this->shim().SelectedItemContainer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RecommendedNavigationTransitionInfo(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>(this->shim().RecommendedNavigationTransitionInfo());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics>
    {
        int32_t __stdcall get_IsPaneOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPaneOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactModeThresholdWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompactModeThresholdWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandedModeThresholdWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExpandedModeThresholdWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterMenuItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterMenuItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FooterMenuItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FooterMenuItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneFooterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneFooterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSettingsVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSettingsVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneToggleButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPaneToggleButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlwaysShowHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlwaysShowHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompactPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpenPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneToggleButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SettingsItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SettingsItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AutoSuggestBoxProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AutoSuggestBoxProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemContainerStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemContainerStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MenuItemContainerStyleSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MenuItemContainerStyleSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTitleBarAutoPaddingEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTitleBarAutoPaddingEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2>
    {
        int32_t __stdcall get_IsBackButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsBackButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsBackEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsBackEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneTitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneTitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneDisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneDisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneCustomContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneCustomContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentOverlayProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentOverlayProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPaneVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFollowsFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFollowsFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShoulderNavigationEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShoulderNavigationEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowLabelModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverflowLabelModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings>
    {
        int32_t __stdcall get_TopPadding(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().TopPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().OverflowButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().PaneToggleButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().BackButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopPaneVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().TopPaneVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftPaneVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().LeftPaneVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SingleSelectionFollowsFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().PaneToggleButtonWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallerPaneToggleButtonWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().SmallerPaneToggleButtonWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2>
    {
        int32_t __stdcall get_OpenPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NavigationViewTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics>
    {
        int32_t __stdcall get_TopPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverflowButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneToggleButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopPaneVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopPaneVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftPaneVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftPaneVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SingleSelectionFollowsFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SingleSelectionFollowsFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneToggleButtonWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneToggleButtonWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallerPaneToggleButtonWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SmallerPaneToggleButtonWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2>
    {
        int32_t __stdcall get_OpenPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpenPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayout>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext>
    {
        int32_t __stdcall get_Children(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::UIElement>>(this->shim().Children());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>
    {
        int32_t __stdcall get_ChildrenCore(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::UI::Xaml::UIElement>>(this->shim().ChildrenCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>
    {
        int32_t __stdcall InitializeForContextCore(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InitializeForContextCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall UninitializeForContextCore(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UninitializeForContextCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MeasureOverride(void* context, winrt::Windows::Foundation::Size availableSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().MeasureOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&availableSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ArrangeOverride(void* context, winrt::Windows::Foundation::Size finalSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().ArrangeOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&finalSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox>
    {
        int32_t __stdcall get_Minimum(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Minimum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Minimum(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Minimum(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Maximum(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Maximum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Maximum(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Maximum(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Value(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Value(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().SmallChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SmallChange(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SmallChange(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LargeChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LargeChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LargeChange(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LargeChange(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PreventKeyboardDisplayOnProgrammaticFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreventKeyboardDisplayOnProgrammaticFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValidationMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NumberBoxValidationMode>(this->shim().ValidationMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ValidationMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ValidationMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NumberBoxValidationMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SpinButtonPlacementMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NumberBoxSpinButtonPlacementMode>(this->shim().SpinButtonPlacementMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SpinButtonPlacementMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SpinButtonPlacementMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::NumberBoxSpinButtonPlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsWrapEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsWrapEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsWrapEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsWrapEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsExpression(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AcceptsExpression());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AcceptsExpression(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AcceptsExpression(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NumberFormatter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Globalization::NumberFormatting::INumberFormatter2>(this->shim().NumberFormatter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NumberFormatter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NumberFormatter(*reinterpret_cast<winrt::Windows::Globalization::NumberFormatting::INumberFormatter2 const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ValueChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ValueChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::NumberBox, winrt::Microsoft::UI::Xaml::Controls::NumberBoxValueChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ValueChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ValueChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::NumberBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics>
    {
        int32_t __stdcall get_MinimumProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinimumProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallChangeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SmallChangeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LargeChangeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LargeChangeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValidationModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ValidationModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SpinButtonPlacementModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SpinButtonPlacementModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsWrapEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsWrapEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsExpressionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AcceptsExpressionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NumberFormatterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NumberFormatterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs>
    {
        int32_t __stdcall get_OldValue(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OldValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewValue(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NewValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPage> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPage>
    {
        int32_t __stdcall get_Frame(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Frame>(this->shim().Frame());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NavigationCacheMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Navigation::NavigationCacheMode>(this->shim().NavigationCacheMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NavigationCacheMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigationCacheMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigationCacheMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopAppBar(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBar>(this->shim().TopAppBar());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopAppBar(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopAppBar(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AppBar const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BottomAppBar(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::AppBar>(this->shim().BottomAppBar());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BottomAppBar(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BottomAppBar(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AppBar const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPageFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPageFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Page>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>
    {
        int32_t __stdcall OnNavigatedFrom(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnNavigatedFrom(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnNavigatedTo(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnNavigatedTo(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnNavigatingFrom(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnNavigatingFrom(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPageStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPageStatics>
    {
        int32_t __stdcall get_FrameProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FrameProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopAppBarProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopAppBarProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BottomAppBarProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BottomAppBarProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPanel>
    {
        int32_t __stdcall get_Children(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::UIElementCollection>(this->shim().Children());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsItemsHost(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsItemsHost());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ChildrenTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ChildrenTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ChildrenTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ChildrenTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundTransition(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::BrushTransition>(this->shim().BackgroundTransition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundTransition(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundTransition(*reinterpret_cast<winrt::Microsoft::UI::Xaml::BrushTransition const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPanelFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Panel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPanelStatics>
    {
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsItemsHostProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsItemsHostProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ChildrenTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ChildrenTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView>
    {
        int32_t __stdcall get_Child(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Child());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Child(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Child(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalShift(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalShift());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalShift(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalShift(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceEndOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalSourceEndOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalSourceEndOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSourceEndOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceOffsetKind(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind>(this->shim().HorizontalSourceOffsetKind());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalSourceOffsetKind(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSourceOffsetKind(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceStartOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalSourceStartOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalSourceStartOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSourceStartOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalShiftClamped(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHorizontalShiftClamped());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHorizontalShiftClamped(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHorizontalShiftClamped(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalShiftClamped(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsVerticalShiftClamped());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsVerticalShiftClamped(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsVerticalShiftClamped(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHorizontalShiftRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxHorizontalShiftRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxHorizontalShiftRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxHorizontalShiftRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxVerticalShiftRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxVerticalShiftRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxVerticalShiftRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxVerticalShiftRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalShift(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalShift());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalShift(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalShift(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceEndOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalSourceEndOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalSourceEndOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSourceEndOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceOffsetKind(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind>(this->shim().VerticalSourceOffsetKind());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalSourceOffsetKind(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSourceOffsetKind(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceStartOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalSourceStartOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalSourceStartOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSourceStartOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RefreshAutomaticHorizontalOffsets() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshAutomaticHorizontalOffsets();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RefreshAutomaticVerticalOffsets() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshAutomaticVerticalOffsets();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ParallaxView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics>
    {
        int32_t __stdcall get_ChildProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ChildProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceEndOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalSourceEndOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceOffsetKindProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalSourceOffsetKindProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSourceStartOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalSourceStartOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHorizontalShiftRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxHorizontalShiftRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalShiftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalShiftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalShiftClampedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHorizontalShiftClampedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalShiftClampedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVerticalShiftClampedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceEndOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalSourceEndOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceOffsetKindProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalSourceOffsetKindProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSourceStartOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalSourceStartOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxVerticalShiftRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxVerticalShiftRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalShiftProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalShiftProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBox>
    {
        int32_t __stdcall get_Password(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Password());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Password(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Password(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PasswordChar(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PasswordChar());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PasswordChar(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasswordChar(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPasswordRevealButtonEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPasswordRevealButtonEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPasswordRevealButtonEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPasswordRevealButtonEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLength(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PreventKeyboardDisplayOnProgrammaticFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreventKeyboardDisplayOnProgrammaticFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PasswordRevealMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PasswordRevealMode>(this->shim().PasswordRevealMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PasswordRevealMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasswordRevealMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PasswordRevealMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::InputScope>(this->shim().InputScope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InputScope(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InputScope(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::InputScope const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanPasteClipboardContent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanPasteClipboardContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_PasswordChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PasswordChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PasswordChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasswordChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContextMenuOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContextMenuOpening(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContextMenuOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Paste(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Paste(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Paste(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Paste(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PasswordChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PasswordChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PasswordBox, winrt::Microsoft::UI::Xaml::Controls::PasswordBoxPasswordChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PasswordChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasswordChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PasteFromClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasteFromClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs>
    {
        int32_t __stdcall get_IsContentChanging(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsContentChanging());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics>
    {
        int32_t __stdcall get_PasswordProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PasswordProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PasswordCharProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PasswordCharProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPasswordRevealButtonEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPasswordRevealButtonEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PasswordRevealModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PasswordRevealModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScopeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InputScopeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanPasteClipboardContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanPasteClipboardContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIcon>
    {
        int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Geometry>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Data(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Data(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Geometry const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PathIcon>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSource>
    {
        int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Geometry>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Data(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Data(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Geometry const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PathIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics>
    {
        int32_t __stdcall get_DataProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DataProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics>
    {
        int32_t __stdcall get_DataProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DataProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture>
    {
        int32_t __stdcall get_BadgeNumber(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().BadgeNumber());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BadgeNumber(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BadgeNumber(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().BadgeGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BadgeGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BadgeGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeImageSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().BadgeImageSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BadgeImageSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BadgeImageSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().BadgeText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BadgeText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BadgeText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroup(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsGroup());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsGroup(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsGroup(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Contact(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::Contacts::Contact>(this->shim().Contact());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Contact(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Contact(*reinterpret_cast<winrt::Windows::ApplicationModel::Contacts::Contact const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayName(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DisplayName());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayName(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayName(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Initials(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Initials());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Initials(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Initials(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreferSmallImage(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PreferSmallImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreferSmallImage(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreferSmallImage(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProfilePicture(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().ProfilePicture());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ProfilePicture(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ProfilePicture(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PersonPictureTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PersonPicture>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics>
    {
        int32_t __stdcall get_BadgeNumberProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BadgeNumberProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BadgeGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeImageSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BadgeImageSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BadgeTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BadgeTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsGroupProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsGroupProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContactProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContactProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayNameProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayNameProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InitialsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InitialsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreferSmallImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreferSmallImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProfilePictureProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ProfilePictureProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings>
    {
        int32_t __stdcall get_ActualInitials(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ActualInitials());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualImageBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageBrush>(this->shim().ActualImageBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPickerConfirmedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPickerConfirmedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ConfirmationButtonsVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ConfirmationButtonsVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ConfirmationButtonsVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ConfirmationButtonsVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Confirmed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Confirmed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PickerFlyout, winrt::Microsoft::UI::Xaml::Controls::PickerConfirmedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Confirmed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Confirmed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ShowAtAsync(void* target, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(this->shim().ShowAtAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&target)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutPresenter>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ConfirmationButtonsVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ConfirmationButtonsVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager>
    {
        int32_t __stdcall get_NumberOfPages(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().NumberOfPages());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NumberOfPages(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NumberOfPages(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPageIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectedPageIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPageIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPageIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxVisiblePips(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxVisiblePips());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxVisiblePips(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxVisiblePips(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility>(this->shim().PreviousButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreviousButtonVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreviousButtonVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NextButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility>(this->shim().NextButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NextButtonVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NextButtonVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PipsPagerButtonVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().PreviousButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreviousButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreviousButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NextButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().NextButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NextButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NextButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPipStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().SelectedPipStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPipStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPipStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NormalPipStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().NormalPipStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NormalPipStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NormalPipStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectedIndexChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectedIndexChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::PipsPager, winrt::Microsoft::UI::Xaml::Controls::PipsPagerSelectedIndexChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectedIndexChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedIndexChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PipsPagerTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager2>
    {
        int32_t __stdcall get_WrapMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PipsPagerWrapMode>(this->shim().WrapMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_WrapMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().WrapMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PipsPagerWrapMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PipsPager>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerSelectedIndexChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerSelectedIndexChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics>
    {
        int32_t __stdcall get_NumberOfPagesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NumberOfPagesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPageIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPageIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxVisiblePipsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxVisiblePipsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreviousButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NextButtonVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NextButtonVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreviousButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreviousButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NextButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NextButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPipStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPipStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NormalPipStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().NormalPipStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2>
    {
        int32_t __stdcall get_WrapModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().WrapModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings>
    {
        int32_t __stdcall get_PipsPagerItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<int32_t>>(this->shim().PipsPagerItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivot> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivot>
    {
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().TitleTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TitleTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TitleTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().LeftHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LeftHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LeftHeader(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().LeftHeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LeftHeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LeftHeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().RightHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RightHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RightHeader(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightHeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().RightHeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RightHeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RightHeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectedIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsLocked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsLocked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsLocked(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsLocked(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderFocusVisualPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PivotHeaderFocusVisualPlacement>(this->shim().HeaderFocusVisualPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderFocusVisualPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderFocusVisualPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PivotHeaderFocusVisualPlacement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHeaderItemsCarouselEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHeaderItemsCarouselEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHeaderItemsCarouselEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHeaderItemsCarouselEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PivotItemLoading(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PivotItemLoading(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PivotItemLoading(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PivotItemLoading(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PivotItemLoaded(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PivotItemLoaded(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PivotItemLoaded(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PivotItemLoaded(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PivotItemUnloading(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PivotItemUnloading(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PivotItemUnloading(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PivotItemUnloading(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PivotItemUnloaded(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PivotItemUnloaded(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Pivot, winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PivotItemUnloaded(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PivotItemUnloaded(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Pivot>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItem>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PivotItem>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Item(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Item(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PivotItem const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::PivotItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IPivotStatics>
    {
        int32_t __stdcall get_TitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftHeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RightHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightHeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RightHeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsLockedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsLockedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderFocusVisualPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderFocusVisualPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHeaderItemsCarouselEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHeaderItemsCarouselEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SlideInAnimationGroupProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SlideInAnimationGroupProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetSlideInAnimationGroup(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::PivotSlideInAnimationGroup>(this->shim().GetSlideInAnimationGroup(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetSlideInAnimationGroup(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetSlideInAnimationGroup(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::PivotSlideInAnimationGroup const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar>
    {
        int32_t __stdcall get_IsIndeterminate(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsIndeterminate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsIndeterminate(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsIndeterminate(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowError(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowError());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowError(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowError(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowPaused(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShowPaused());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowPaused(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowPaused(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ProgressBarTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ProgressBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics>
    {
        int32_t __stdcall get_IsIndeterminateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsIndeterminateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowErrorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowErrorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowPausedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowPausedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings>
    {
        int32_t __stdcall get_ContainerAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ContainerAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContainerAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ContainerAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Container2AnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Container2AnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Container2AnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Container2AnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContainerAnimationMidPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ContainerAnimationMidPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IndicatorLengthDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().IndicatorLengthDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClipRect(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::RectangleGeometry>(this->shim().ClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EllipseAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().EllipseAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EllipseAnimationWellPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().EllipseAnimationWellPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EllipseDiameter(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().EllipseDiameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EllipseOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().EllipseOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing>
    {
        int32_t __stdcall get_IsActive(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsActive());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsActive(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsActive(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsIndeterminate(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsIndeterminate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsIndeterminate(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsIndeterminate(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ProgressRingTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Value(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Value(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Minimum(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Minimum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Minimum(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Minimum(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Maximum(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Maximum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Maximum(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Maximum(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ProgressRing>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics>
    {
        int32_t __stdcall get_IsActiveProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsActiveProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsIndeterminateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsIndeterminateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinimumProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinimumProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings>
    {
        int32_t __stdcall get_EllipseDiameter(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().EllipseDiameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EllipseOffset(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().EllipseOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxSideLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxSideLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButton>
    {
        int32_t __stdcall get_GroupName(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().GroupName());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupName(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupName(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RadioButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics>
    {
        int32_t __stdcall get_GroupNameProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupNameProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons>
    {
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().ContainerFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectedIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_MaxColumns(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxColumns());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxColumns(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxColumns(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RadioButtons>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics>
    {
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxColumnsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxColumnsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem>
    {
        int32_t __stdcall get_IsChecked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsChecked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsChecked(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsChecked(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupName(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().GroupName());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GroupName(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GroupName(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RadioMenuFlyoutItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics>
    {
        int32_t __stdcall get_IsCheckedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCheckedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GroupNameProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GroupNameProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2>
    {
        int32_t __stdcall get_AreCheckStatesEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreCheckStatesEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAreCheckStatesEnabled(void* object, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAreCheckStatesEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const*>(&object), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAreCheckStatesEnabled(void* object, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAreCheckStatesEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const*>(&object)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl>
    {
        int32_t __stdcall get_Caption(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Caption());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Caption(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Caption(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InitialSetValue(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().InitialSetValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InitialSetValue(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InitialSetValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClearEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsClearEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsClearEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsClearEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsReadOnly(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsReadOnly());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsReadOnly(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsReadOnly(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxRating(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxRating());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxRating(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxRating(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderValue(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().PlaceholderValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderValue(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemInfo(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo>(this->shim().ItemInfo());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemInfo(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemInfo(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Value(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Value(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ValueChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ValueChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RatingControl, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ValueChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ValueChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RatingControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics>
    {
        int32_t __stdcall get_CaptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CaptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InitialSetValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InitialSetValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClearEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsClearEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsReadOnlyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsReadOnlyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxRatingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxRatingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemInfoProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemInfoProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>
    {
        int32_t __stdcall get_DisabledGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().DisabledGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Glyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Glyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Glyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Glyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PointerOverGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverPlaceholderGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PointerOverPlaceholderGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverPlaceholderGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverPlaceholderGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnsetGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().UnsetGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UnsetGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UnsetGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RatingItemFontInfo>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics>
    {
        int32_t __stdcall get_DisabledGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverPlaceholderGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverPlaceholderGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnsetGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UnsetGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo>
    {
        int32_t __stdcall get_DisabledImage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().DisabledImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledImage(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledImage(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Image(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().Image());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Image(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Image(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderImage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().PlaceholderImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderImage(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderImage(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverImage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().PointerOverImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverImage(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverImage(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverPlaceholderImage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().PointerOverPlaceholderImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverPlaceholderImage(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverPlaceholderImage(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnsetImage(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::ImageSource>(this->shim().UnsetImage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UnsetImage(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UnsetImage(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::ImageSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RatingItemImageInfo>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics>
    {
        int32_t __stdcall get_DisabledImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverPlaceholderImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverPlaceholderImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UnsetImageProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UnsetImageProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer>
    {
        int32_t __stdcall get_Visualizer(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer>(this->shim().Visualizer());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Visualizer(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Visualizer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PullDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection>(this->shim().PullDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PullDirection(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PullDirection(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_RefreshRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().RefreshRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshContainer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_RefreshRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall RequestRefresh() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RequestRefresh();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshContainer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics>
    {
        int32_t __stdcall get_VisualizerProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VisualizerProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PullDirectionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PullDirectionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs>
    {
        int32_t __stdcall get_InteractionRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().InteractionRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs>
    {
        int32_t __stdcall GetDeferral(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs>
    {
        int32_t __stdcall get_OldState(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState>(this->shim().OldState());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewState(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState>(this->shim().NewState());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer>
    {
        int32_t __stdcall RequestRefresh() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RequestRefresh();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_State(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState>(this->shim().State());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_RefreshRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().RefreshRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_RefreshRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_RefreshStateChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().RefreshStateChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::RefreshStateChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_RefreshStateChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RefreshStateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics>
    {
        int32_t __stdcall get_InfoProviderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InfoProviderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel>
    {
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RelativePanel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics>
    {
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftOfProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftOfProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLeftOf(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetLeftOf(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetLeftOf(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetLeftOf(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AboveProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AboveProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAbove(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAbove(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAbove(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAbove(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightOfProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RightOfProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRightOf(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetRightOf(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetRightOf(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetRightOf(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BelowProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BelowProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBelow(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetBelow(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetBelow(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetBelow(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignHorizontalCenterWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignHorizontalCenterWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignHorizontalCenterWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignHorizontalCenterWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignHorizontalCenterWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignHorizontalCenterWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignVerticalCenterWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignVerticalCenterWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignVerticalCenterWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignVerticalCenterWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignVerticalCenterWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignVerticalCenterWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignLeftWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignLeftWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignLeftWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignLeftWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignLeftWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignLeftWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignTopWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignTopWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignTopWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignTopWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignTopWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignTopWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignRightWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignRightWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignRightWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignRightWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignRightWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignRightWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignBottomWithProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignBottomWithProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignBottomWith(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetAlignBottomWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignBottomWith(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignBottomWith(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignLeftWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignLeftWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignLeftWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignLeftWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignLeftWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignLeftWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignTopWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignTopWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignTopWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignTopWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignTopWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignTopWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignRightWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignRightWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignRightWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignRightWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignRightWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignRightWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignBottomWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignBottomWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignBottomWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignBottomWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignBottomWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignBottomWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignHorizontalCenterWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignHorizontalCenterWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignHorizontalCenterWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignHorizontalCenterWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignHorizontalCenterWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignHorizontalCenterWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AlignVerticalCenterWithPanelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AlignVerticalCenterWithPanelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlignVerticalCenterWithPanel(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetAlignVerticalCenterWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAlignVerticalCenterWithPanel(void* element, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAlignVerticalCenterWithPanel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenter>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RevealListViewItemPresenter>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox>
    {
        int32_t __stdcall get_IsReadOnly(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsReadOnly());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsReadOnly(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsReadOnly(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsReturn(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AcceptsReturn());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AcceptsReturn(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AcceptsReturn(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().TextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextWrapping>(this->shim().TextWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextWrapping(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSpellCheckEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSpellCheckEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSpellCheckEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSpellCheckEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextPredictionEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextPredictionEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextPredictionEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextPredictionEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Document(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Text::RichEditTextDocument>(this->shim().Document());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::InputScope>(this->shim().InputScope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InputScope(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InputScope(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::InputScope const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PreventKeyboardDisplayOnProgrammaticFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreventKeyboardDisplayOnProgrammaticFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorFontEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorFontEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorFontEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorWhenNotFocused(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColorWhenNotFocused());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColorWhenNotFocused(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColorWhenNotFocused(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLength(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().HorizontalTextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalTextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalTextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterCasing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CharacterCasing>(this->shim().CharacterCasing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterCasing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterCasing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CharacterCasing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledFormattingAccelerators(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DisabledFormattingAccelerators>(this->shim().DisabledFormattingAccelerators());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledFormattingAccelerators(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledFormattingAccelerators(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DisabledFormattingAccelerators const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextDocument(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Text::RichEditTextDocument>(this->shim().TextDocument());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProofingMenuFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().ProofingMenuFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TextChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContextMenuOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContextMenuOpening(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContextMenuOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Paste(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Paste(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Paste(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Paste(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionStarted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionStarted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionStarted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionStarted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionEnded(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionEnded(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionEnded(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionEnded(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CopyingToClipboard(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CopyingToClipboard(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CopyingToClipboard(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CopyingToClipboard(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CuttingToClipboard(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CuttingToClipboard(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CuttingToClipboard(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CuttingToClipboard(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectionChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxSelectionChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall GetLinguisticAlternativesAsync(void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<hstring>>>(this->shim().GetLinguisticAlternativesAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClipboardCopyFormat(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RichEditClipboardFormat>(this->shim().ClipboardCopyFormat());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClipboardCopyFormat(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClipboardCopyFormat(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RichEditClipboardFormat const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DesiredCandidateWindowAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment>(this->shim().DesiredCandidateWindowAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DesiredCandidateWindowAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DesiredCandidateWindowAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CandidateWindowBoundsChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CandidateWindowBoundsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CandidateWindowBoundsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichEditBox, winrt::Microsoft::UI::Xaml::Controls::RichEditBoxTextChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RichEditBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs>
    {
        int32_t __stdcall get_SelectionStart(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics>
    {
        int32_t __stdcall get_IsReadOnlyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsReadOnlyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsReturnProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AcceptsReturnProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrappingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextWrappingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSpellCheckEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSpellCheckEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextPredictionEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextPredictionEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScopeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InputScopeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorFontEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorWhenNotFocusedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorWhenNotFocusedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalTextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterCasingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterCasingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledFormattingAcceleratorsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledFormattingAcceleratorsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProofingMenuFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ProofingMenuFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DesiredCandidateWindowAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DesiredCandidateWindowAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClipboardCopyFormatProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ClipboardCopyFormatProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs>
    {
        int32_t __stdcall get_IsContentChanging(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsContentChanging());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock>
    {
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().FontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStretch(*reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextWrapping>(this->shim().TextWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextWrapping(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextTrimming(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextTrimming>(this->shim().TextTrimming());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextTrimming(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextTrimming(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextTrimming const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().TextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Blocks(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::BlockCollection>(this->shim().Blocks());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LineHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategy(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::LineStackingStrategy>(this->shim().LineStackingStrategy());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineStackingStrategy(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineStackingStrategy(*reinterpret_cast<winrt::Microsoft::UI::Xaml::LineStackingStrategy const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CharacterSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterSpacing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentTarget(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow>(this->shim().OverflowContentTarget());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OverflowContentTarget(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OverflowContentTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSelectionEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextSelectionEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextSelectionEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextSelectionEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasOverflowContent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasOverflowContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SelectedText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentStart(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentEnd(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentEnd());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionStart(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().SelectionStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionEnd(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().SelectionEnd());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BaselineOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().BaselineOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLines(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLines(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLines(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBounds(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextLineBounds>(this->shim().TextLineBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextLineBounds(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextLineBounds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextLineBounds const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment>(this->shim().OpticalMarginAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpticalMarginAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpticalMarginAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorFontEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorFontEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorFontEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextDecorations(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::TextDecorations>(this->shim().TextDecorations());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextDecorations(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextDecorations(*reinterpret_cast<winrt::Windows::UI::Text::TextDecorations const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmed(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextTrimmed());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().HorizontalTextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalTextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalTextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextHighlighters(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Documents::TextHighlighter>>(this->shim().TextHighlighters());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContextMenuOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContextMenuOpening(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContextMenuOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_IsTextTrimmedChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsTextTrimmedChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Select(void* start, void* end) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Select(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Documents::TextPointer const*>(&start), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Documents::TextPointer const*>(&end));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPositionFromPoint(winrt::Windows::Foundation::Point point, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().GetPositionFromPoint(*reinterpret_cast<winrt::Windows::Foundation::Point const*>(&point)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CopySelectionToClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CopySelectionToClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextIndent(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().TextIndent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextIndent(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextIndent(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow>
    {
        int32_t __stdcall get_OverflowContentTarget(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow>(this->shim().OverflowContentTarget());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OverflowContentTarget(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OverflowContentTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::RichTextBlock>(this->shim().ContentSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasOverflowContent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasOverflowContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentStart(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentEnd(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentEnd());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BaselineOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().BaselineOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLines(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLines(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLines(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmed(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextTrimmed());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_IsTextTrimmedChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsTextTrimmedChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall GetPositionFromPoint(winrt::Windows::Foundation::Point point, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().GetPositionFromPoint(*reinterpret_cast<winrt::Windows::Foundation::Point const*>(&point)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics>
    {
        int32_t __stdcall get_OverflowContentTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverflowContentTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasOverflowContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HasOverflowContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLinesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLinesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextTrimmedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics>
    {
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrappingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextWrappingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextTrimmingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextTrimmingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineStackingStrategyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverflowContentTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSelectionEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextSelectionEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasOverflowContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HasOverflowContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLinesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLinesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextLineBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpticalMarginAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorFontEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextDecorationsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextDecorationsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextTrimmedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalTextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextIndentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextIndentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinition>
    {
        int32_t __stdcall get_Height(struct struct_Microsoft_UI_Xaml_GridLength* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::GridLength>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::GridLength>(this->shim().Height());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Height(struct struct_Microsoft_UI_Xaml_GridLength value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Height(*reinterpret_cast<winrt::Microsoft::UI::Xaml::GridLength const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ActualHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics>
    {
        int32_t __stdcall get_HeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider>
    {
        int32_t __stdcall get_CurrentAnchor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().CurrentAnchor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterAnchorCandidate(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterAnchorCandidate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall UnregisterAnchorCandidate(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UnregisterAnchorCandidate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter>
    {
        int32_t __stdcall get_CanVerticallyScroll(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanVerticallyScroll());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanVerticallyScroll(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanVerticallyScroll(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanHorizontallyScroll(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanHorizontallyScroll());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanHorizontallyScroll(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanHorizontallyScroll(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollOwner(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ScrollOwner());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ScrollOwner(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollOwner(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanContentRenderOutsideBounds(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanContentRenderOutsideBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanContentRenderOutsideBounds(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanContentRenderOutsideBounds(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SizesContentToTemplatedParent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SizesContentToTemplatedParent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SizesContentToTemplatedParent(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SizesContentToTemplatedParent(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LineUp() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineUp();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LineDown() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineDown();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LineLeft() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineLeft();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall LineRight() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineRight();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PageUp() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PageUp();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PageDown() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PageDown();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PageLeft() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PageLeft();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PageRight() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PageRight();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MouseWheelUp() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MouseWheelUp();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MouseWheelDown() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MouseWheelDown();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MouseWheelLeft() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MouseWheelLeft();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MouseWheelRight() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MouseWheelRight();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHorizontalOffset(double offset) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetHorizontalOffset(offset);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetVerticalOffset(double offset) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetVerticalOffset(offset);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MakeVisible(void* visual, winrt::Windows::Foundation::Rect rectangle, winrt::Windows::Foundation::Rect* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Rect>(this->shim().MakeVisible(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&visual), *reinterpret_cast<winrt::Windows::Foundation::Rect const*>(&rectangle)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics>
    {
        int32_t __stdcall get_CanContentRenderOutsideBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanContentRenderOutsideBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SizesContentToTemplatedParentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SizesContentToTemplatedParentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentAnchor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().CurrentAnchor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollPresenter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter>(this->shim().ScrollPresenter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpressionAnimationSources(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Composition::CompositionPropertySet>(this->shim().ExpressionAnimationSources());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().ZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollableWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollableHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_State(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingInteractionState>(this->shim().State());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility>(this->shim().HorizontalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollBarVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility>(this->shim().VerticalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollBarVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentOrientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation>(this->shim().ContentOrientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentOrientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentOrientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollChainMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode>(this->shim().HorizontalScrollChainMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollChainMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollChainMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollChainMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode>(this->shim().VerticalScrollChainMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollChainMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollChainMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollRailMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode>(this->shim().HorizontalScrollRailMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollRailMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollRailMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollRailMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode>(this->shim().VerticalScrollRailMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollRailMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollRailMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>(this->shim().HorizontalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>(this->shim().VerticalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().ComputedHorizontalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().ComputedVerticalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>(this->shim().ComputedHorizontalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>(this->shim().ComputedVerticalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomChainMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode>(this->shim().ZoomChainMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomChainMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomChainMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode>(this->shim().ZoomMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IgnoredInputKinds(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds>(this->shim().IgnoredInputKinds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IgnoredInputKinds(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IgnoredInputKinds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinZoomFactor(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinZoomFactor(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinZoomFactor(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxZoomFactor(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MaxZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxZoomFactor(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxZoomFactor(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RegisterAnchorCandidate(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterAnchorCandidate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall UnregisterAnchorCandidate(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UnregisterAnchorCandidate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollTo(double horizontalOffset, double verticalOffset, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ScrollTo(horizontalOffset, verticalOffset));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollToWithOptions(double horizontalOffset, double verticalOffset, void* options, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ScrollTo(horizontalOffset, verticalOffset, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ScrollBy(horizontalOffsetDelta, verticalOffsetDelta));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollByWithOptions(double horizontalOffsetDelta, double verticalOffsetDelta, void* options, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ScrollBy(horizontalOffsetDelta, verticalOffsetDelta, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddScrollVelocity(winrt::Windows::Foundation::Numerics::float2 offsetsVelocity, void* inertiaDecayRate, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().AddScrollVelocity(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&offsetsVelocity), *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&inertiaDecayRate)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ZoomTo(float zoomFactor, void* centerPoint, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ZoomTo(zoomFactor, *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&centerPoint)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ZoomToWithOptions(float zoomFactor, void* centerPoint, void* options, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ZoomTo(zoomFactor, *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&centerPoint), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ZoomBy(float zoomFactorDelta, void* centerPoint, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ZoomBy(zoomFactorDelta, *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&centerPoint)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ZoomByWithOptions(float zoomFactorDelta, void* centerPoint, void* options, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ZoomBy(zoomFactorDelta, *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&centerPoint), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall AddZoomVelocity(float zoomFactorVelocity, void* centerPoint, void* inertiaDecayRate, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().AddZoomVelocity(zoomFactorVelocity, *reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Numerics::float2> const*>(&centerPoint), *reinterpret_cast<winrt::Windows::Foundation::IReference<float> const*>(&inertiaDecayRate)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ExtentChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ExtentChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ExtentChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExtentChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().StateChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_StateChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ViewChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ViewChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ViewChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ScrollAnimationStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ScrollAnimationStarting(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ScrollAnimationStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollAnimationStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ZoomAnimationStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ZoomAnimationStarting(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ZoomAnimationStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomAnimationStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ScrollCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ScrollCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ScrollCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ZoomCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ZoomCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ZoomCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_BringingIntoView(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().BringingIntoView(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_BringingIntoView(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BringingIntoView(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_AnchorRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().AnchorRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollView, winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_AnchorRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnchorRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollPresenterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ScrollPresenterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentOrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentOrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollChainModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollChainModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollChainModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollChainModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollRailModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollRailModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollRailModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollRailModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedHorizontalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedVerticalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedHorizontalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedVerticalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomChainModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomChainModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IgnoredInputKindsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IgnoredInputKindsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinZoomFactorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinZoomFactorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxZoomFactorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxZoomFactorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAnchorRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalAnchorRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAnchorRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalAnchorRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewer>
    {
        int32_t __stdcall get_HorizontalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility>(this->shim().HorizontalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollBarVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility>(this->shim().VerticalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollBarVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalRailEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHorizontalRailEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHorizontalRailEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHorizontalRailEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalRailEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsVerticalRailEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsVerticalRailEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsVerticalRailEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalScrollChainingEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsHorizontalScrollChainingEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsHorizontalScrollChainingEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsHorizontalScrollChainingEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalScrollChainingEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsVerticalScrollChainingEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsVerticalScrollChainingEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsVerticalScrollChainingEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomChainingEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomChainingEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomChainingEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomChainingEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsScrollInertiaEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsScrollInertiaEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsScrollInertiaEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsScrollInertiaEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomInertiaEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomInertiaEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomInertiaEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomInertiaEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollMode>(this->shim().HorizontalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollMode>(this->shim().VerticalScrollMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalScrollMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ZoomMode>(this->shim().ZoomMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ZoomMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSnapPointsAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment>(this->shim().HorizontalSnapPointsAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalSnapPointsAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSnapPointsAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSnapPointsAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment>(this->shim().VerticalSnapPointsAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalSnapPointsAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSnapPointsAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSnapPointsType(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType>(this->shim().HorizontalSnapPointsType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalSnapPointsType(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSnapPointsType(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSnapPointsType(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType>(this->shim().VerticalSnapPointsType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalSnapPointsType(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSnapPointsType(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomSnapPointsType(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType>(this->shim().ZoomSnapPointsType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomSnapPointsType(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomSnapPointsType(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SnapPointsType const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollableWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().ComputedHorizontalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ScrollableHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollBarVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().ComputedVerticalScrollBarVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExtentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().MinZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinZoomFactor(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinZoomFactor(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().MaxZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxZoomFactor(float value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxZoomFactor(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().ZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomSnapPoints(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<float>>(this->shim().ZoomSnapPoints());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopLeftHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().TopLeftHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopLeftHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopLeftHeader(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().LeftHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LeftHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LeftHeader(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().TopHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopHeader(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReduceViewportForCoreInputViewOcclusions(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ReduceViewportForCoreInputViewOcclusions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ReduceViewportForCoreInputViewOcclusions(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ReduceViewportForCoreInputViewOcclusions(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAnchorRatio(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalAnchorRatio());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalAnchorRatio(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalAnchorRatio(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanContentRenderOutsideBounds(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanContentRenderOutsideBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanContentRenderOutsideBounds(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanContentRenderOutsideBounds(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_AnchorRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().AnchorRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer, winrt::Microsoft::UI::Xaml::Controls::AnchorRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_AnchorRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnchorRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ViewChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ViewChanging(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ViewChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ViewChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ViewChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ViewChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DirectManipulationStarted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DirectManipulationStarted(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DirectManipulationStarted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DirectManipulationStarted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DirectManipulationCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DirectManipulationCompleted(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DirectManipulationCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DirectManipulationCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ScrollToHorizontalOffset(double offset) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollToHorizontalOffset(offset);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ScrollToVerticalOffset(double offset) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollToVerticalOffset(offset);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ZoomToFactor(float factor) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomToFactor(factor);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ChangeView(void* horizontalOffset, void* verticalOffset, void* zoomFactor, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ChangeView(*reinterpret_cast<winrt::Windows::Foundation::IReference<double> const*>(&horizontalOffset), *reinterpret_cast<winrt::Windows::Foundation::IReference<double> const*>(&verticalOffset), *reinterpret_cast<winrt::Windows::Foundation::IReference<float> const*>(&zoomFactor)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ChangeViewWithOptionalAnimation(void* horizontalOffset, void* verticalOffset, void* zoomFactor, bool disableAnimation, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ChangeView(*reinterpret_cast<winrt::Windows::Foundation::IReference<double> const*>(&horizontalOffset), *reinterpret_cast<winrt::Windows::Foundation::IReference<double> const*>(&verticalOffset), *reinterpret_cast<winrt::Windows::Foundation::IReference<float> const*>(&zoomFactor), disableAnimation));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InvalidateScrollInfo() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InvalidateScrollInfo();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDeferredScrollingEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDeferredScrollingEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDeferredScrollingEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDeferredScrollingEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BringIntoViewOnFocusChange(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().BringIntoViewOnFocusChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BringIntoViewOnFocusChange(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BringIntoViewOnFocusChange(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics>
    {
        int32_t __stdcall get_HorizontalSnapPointsAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalSnapPointsAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSnapPointsAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalSnapPointsAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalSnapPointsTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalSnapPointsTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSnapPointsTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalSnapPointsTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomSnapPointsTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomSnapPointsTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ViewportWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ScrollableWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedHorizontalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedHorizontalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExtentWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ViewportHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ViewportHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScrollableHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ScrollableHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComputedVerticalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComputedVerticalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtentHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExtentHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinZoomFactorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinZoomFactorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxZoomFactorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxZoomFactorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomFactorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomFactorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomSnapPointsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomSnapPointsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopLeftHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopLeftHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LeftHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReduceViewportForCoreInputViewOcclusionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReduceViewportForCoreInputViewOcclusionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalAnchorRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalAnchorRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalAnchorRatioProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalAnchorRatioProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetHorizontalScrollBarVisibility(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility>(this->shim().GetHorizontalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHorizontalScrollBarVisibility(void* element, int32_t horizontalScrollBarVisibility) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetHorizontalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const*>(&horizontalScrollBarVisibility));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollBarVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollBarVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVerticalScrollBarVisibility(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility>(this->shim().GetVerticalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetVerticalScrollBarVisibility(void* element, int32_t verticalScrollBarVisibility) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetVerticalScrollBarVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const*>(&verticalScrollBarVisibility));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalRailEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHorizontalRailEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsHorizontalRailEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsHorizontalRailEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsHorizontalRailEnabled(void* element, bool isHorizontalRailEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsHorizontalRailEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isHorizontalRailEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalRailEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVerticalRailEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsVerticalRailEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsVerticalRailEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsVerticalRailEnabled(void* element, bool isVerticalRailEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsVerticalRailEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isVerticalRailEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsHorizontalScrollChainingEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsHorizontalScrollChainingEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsHorizontalScrollChainingEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsHorizontalScrollChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsHorizontalScrollChainingEnabled(void* element, bool isHorizontalScrollChainingEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsHorizontalScrollChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isHorizontalScrollChainingEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVerticalScrollChainingEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVerticalScrollChainingEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsVerticalScrollChainingEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsVerticalScrollChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsVerticalScrollChainingEnabled(void* element, bool isVerticalScrollChainingEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsVerticalScrollChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isVerticalScrollChainingEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomChainingEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomChainingEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsZoomChainingEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsZoomChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsZoomChainingEnabled(void* element, bool isZoomChainingEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsZoomChainingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isZoomChainingEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsScrollInertiaEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsScrollInertiaEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsScrollInertiaEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsScrollInertiaEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsScrollInertiaEnabled(void* element, bool isScrollInertiaEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsScrollInertiaEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isScrollInertiaEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomInertiaEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomInertiaEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsZoomInertiaEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsZoomInertiaEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsZoomInertiaEnabled(void* element, bool isZoomInertiaEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsZoomInertiaEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isZoomInertiaEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetHorizontalScrollMode(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollMode>(this->shim().GetHorizontalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHorizontalScrollMode(void* element, int32_t horizontalScrollMode) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetHorizontalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollMode const*>(&horizontalScrollMode));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalScrollModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalScrollModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVerticalScrollMode(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollMode>(this->shim().GetVerticalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetVerticalScrollMode(void* element, int32_t verticalScrollMode) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetVerticalScrollMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollMode const*>(&verticalScrollMode));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetZoomMode(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::ZoomMode>(this->shim().GetZoomMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetZoomMode(void* element, int32_t zoomMode) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetZoomMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ZoomMode const*>(&zoomMode));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanContentRenderOutsideBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanContentRenderOutsideBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetCanContentRenderOutsideBounds(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetCanContentRenderOutsideBounds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetCanContentRenderOutsideBounds(void* element, bool canContentRenderOutsideBounds) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetCanContentRenderOutsideBounds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), canContentRenderOutsideBounds);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDeferredScrollingEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDeferredScrollingEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsDeferredScrollingEnabled(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsDeferredScrollingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsDeferredScrollingEnabled(void* element, bool isDeferredScrollingEnabled) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsDeferredScrollingEnabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), isDeferredScrollingEnabled);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BringIntoViewOnFocusChangeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BringIntoViewOnFocusChangeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetBringIntoViewOnFocusChange(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetBringIntoViewOnFocusChange(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetBringIntoViewOnFocusChange(void* element, bool bringIntoViewOnFocusChange) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetBringIntoViewOnFocusChange(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), bringIntoViewOnFocusChange);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView>
    {
        int32_t __stdcall get_HorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().ZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs>
    {
        int32_t __stdcall get_IsIntermediate(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsIntermediate());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs>
    {
        int32_t __stdcall get_NextView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerView>(this->shim().NextView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FinalView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerView>(this->shim().FinalView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsInertial(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsInertial());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs>
    {
        int32_t __stdcall get_AnchorCandidates(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::UIElement>>(this->shim().AnchorCandidates());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AnchorElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().AnchorElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AnchorElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnchorElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs>
    {
        int32_t __stdcall get_SnapPointsMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode>(this->shim().SnapPointsMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SnapPointsMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SnapPointsMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RequestEventArgs(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::BringIntoViewRequestedEventArgs>(this->shim().RequestEventArgs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TargetHorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().TargetHorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TargetVerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().TargetVerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CorrelationId(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CorrelationId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs>
    {
        int32_t __stdcall get_Animation(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Composition::CompositionAnimation>(this->shim().Animation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Animation(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Animation(*reinterpret_cast<winrt::Microsoft::UI::Composition::CompositionAnimation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StartPosition(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().StartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EndPosition(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().EndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CorrelationId(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CorrelationId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs>
    {
        int32_t __stdcall get_CorrelationId(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CorrelationId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>
    {
        int32_t __stdcall get_AnimationMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode>(this->shim().AnimationMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AnimationMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnimationMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SnapPointsMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode>(this->shim().SnapPointsMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SnapPointsMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SnapPointsMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory>
    {
        int32_t __stdcall CreateInstance(int32_t animationMode, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions>(this->shim().CreateInstance(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&animationMode), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateInstance2(int32_t animationMode, int32_t snapPointsMode, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions>(this->shim().CreateInstance2(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&animationMode), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const*>(&snapPointsMode), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs>
    {
        int32_t __stdcall get_CenterPoint(winrt::Windows::Foundation::Numerics::float2* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float2>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float2>(this->shim().CenterPoint());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StartZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().StartZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EndZoomFactor(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().EndZoomFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Animation(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Composition::CompositionAnimation>(this->shim().Animation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Animation(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Animation(*reinterpret_cast<winrt::Microsoft::UI::Composition::CompositionAnimation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CorrelationId(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CorrelationId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs>
    {
        int32_t __stdcall get_CorrelationId(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CorrelationId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>
    {
        int32_t __stdcall get_AnimationMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode>(this->shim().AnimationMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AnimationMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AnimationMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SnapPointsMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode>(this->shim().SnapPointsMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SnapPointsMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SnapPointsMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory>
    {
        int32_t __stdcall CreateInstance(int32_t animationMode, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions>(this->shim().CreateInstance(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&animationMode), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CreateInstance2(int32_t animationMode, int32_t snapPointsMode, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions>(this->shim().CreateInstance2(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const*>(&animationMode), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const*>(&snapPointsMode), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs>
    {
        int32_t __stdcall get_AddedSections(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>>(this->shim().AddedSections());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RemovedSections(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::HubSection>>(this->shim().RemovedSections());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgsFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs>
    {
        int32_t __stdcall get_AddedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().AddedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RemovedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().RemovedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory>
    {
        int32_t __stdcall CreateInstanceWithRemovedItemsAndAddedItems(void* removedItems, void* addedItems, void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventArgs>(this->shim().CreateInstanceWithRemovedItemsAndAddedItems(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable> const*>(&removedItems), *reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable> const*>(&addedItems), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar>
    {
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SelectorBar, winrt::Microsoft::UI::Xaml::Controls::SelectorBarSelectionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SelectorBar>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem>
    {
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Icon(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().Icon());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Icon(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Icon(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics>
    {
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarSelectionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarSelectionChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics>
    {
        int32_t __stdcall get_ItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom>
    {
        int32_t __stdcall get_ZoomedInView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>(this->shim().ZoomedInView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomedInView(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomedInView(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomedOutView(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>(this->shim().ZoomedOutView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ZoomedOutView(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ZoomedOutView(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomedInViewActive(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomedInViewActive());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomedInViewActive(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomedInViewActive(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanChangeViews(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanChangeViews());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanChangeViews(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanChangeViews(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ViewChangeStarted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ViewChangeStarted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ViewChangeStarted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewChangeStarted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ViewChangeCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ViewChangeCompleted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ViewChangeCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewChangeCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ToggleActiveView() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ToggleActiveView();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomOutButtonEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomOutButtonEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomOutButtonEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomOutButtonEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation>
    {
        int32_t __stdcall get_SemanticZoomOwner(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SemanticZoom>(this->shim().SemanticZoomOwner());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SemanticZoomOwner(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SemanticZoomOwner(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoom const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsActiveView(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsActiveView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsActiveView(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsActiveView(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomedInView(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsZoomedInView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsZoomedInView(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsZoomedInView(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InitializeViewChange() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InitializeViewChange();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CompleteViewChange() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompleteViewChange();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MakeVisible(void* item) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MakeVisible(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&item));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall StartViewChangeFrom(void* source, void* destination) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StartViewChangeFrom(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&source), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&destination));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall StartViewChangeTo(void* source, void* destination) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StartViewChangeTo(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&source), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&destination));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CompleteViewChangeFrom(void* source, void* destination) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompleteViewChangeFrom(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&source), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&destination));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CompleteViewChangeTo(void* source, void* destination) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompleteViewChangeTo(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&source), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&destination));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Item(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Item(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Bounds(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().Bounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Bounds(winrt::Windows::Foundation::Rect value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Bounds(*reinterpret_cast<winrt::Windows::Foundation::Rect const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics>
    {
        int32_t __stdcall get_ZoomedInViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomedInViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ZoomedOutViewProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ZoomedOutViewProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomedInViewActiveProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomedInViewActiveProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanChangeViewsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanChangeViewsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsZoomOutButtonEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsZoomOutButtonEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs>
    {
        int32_t __stdcall get_IsSourceZoomedInView(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSourceZoomedInView());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSourceZoomedInView(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSourceZoomedInView(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SourceItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation>(this->shim().SourceItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SourceItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SourceItem(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DestinationItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation>(this->shim().DestinationItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DestinationItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DestinationItem(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISlider> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISlider>
    {
        int32_t __stdcall get_IntermediateValue(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().IntermediateValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IntermediateValue(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IntermediateValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StepFrequency(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().StepFrequency());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_StepFrequency(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StepFrequency(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SnapsTo(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SliderSnapsTo>(this->shim().SnapsTo());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SnapsTo(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SnapsTo(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SliderSnapsTo const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TickFrequency(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().TickFrequency());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TickFrequency(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TickFrequency(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TickPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::TickPlacement>(this->shim().TickPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TickPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TickPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::TickPlacement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDirectionReversed(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDirectionReversed());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDirectionReversed(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDirectionReversed(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsThumbToolTipEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsThumbToolTipEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsThumbToolTipEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsThumbToolTipEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ThumbToolTipValueConverter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Data::IValueConverter>(this->shim().ThumbToolTipValueConverter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ThumbToolTipValueConverter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ThumbToolTipValueConverter(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Data::IValueConverter const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISliderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISliderFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Slider>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISliderStatics>
    {
        int32_t __stdcall get_IntermediateValueProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IntermediateValueProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StepFrequencyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StepFrequencyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SnapsToProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SnapsToProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TickFrequencyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TickFrequencyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TickPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TickPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsDirectionReversedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDirectionReversedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsThumbToolTipEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsThumbToolTipEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ThumbToolTipValueConverterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ThumbToolTipValueConverterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton>
    {
        int32_t __stdcall get_Flyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().Flyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Flyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Flyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Command(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().Command());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Command(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Command(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Click(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Click(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitButton, winrt::Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Click(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Click(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonClickEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonClickEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SplitButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics>
    {
        int32_t __stdcall get_FlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Pane());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Pane(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pane(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPaneOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsPaneOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsPaneOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpenPaneLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpenPaneLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CompactPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CompactPaneLength(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompactPaneLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanePlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SplitViewPanePlacement>(this->shim().PanePlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PanePlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PanePlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SplitViewPanePlacement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SplitViewDisplayMode>(this->shim().DisplayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisplayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisplayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SplitViewDisplayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneBackground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().PaneBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PaneBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_PaneClosing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneClosing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneClosing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneClosing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneClosed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneClosed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneClosed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneClosed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneOpening(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PaneOpened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().PaneOpened(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SplitView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PaneOpened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PaneOpened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SplitView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPaneOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPaneOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpenPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompactPaneLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanePlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PanePlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisplayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisplayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaneBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaneBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout>
    {
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Spacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Spacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Spacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Spacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StackLayout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics>
    {
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel>
    {
        int32_t __stdcall get_AreScrollSnapPointsRegular(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreScrollSnapPointsRegular());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreScrollSnapPointsRegular(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreScrollSnapPointsRegular(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing>(this->shim().BackgroundSizing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BackgroundSizing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BackgroundSizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::BackgroundSizing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().BorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().BorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::CornerRadius>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::CornerRadius>(this->shim().CornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Spacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Spacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Spacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Spacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StackPanel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics>
    {
        int32_t __stdcall get_AreScrollSnapPointsRegularProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreScrollSnapPointsRegularProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundSizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundSizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelector> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelector>
    {
        int32_t __stdcall SelectStyle(void* item, void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().SelectStyle(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StyleSelector>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>
    {
        int32_t __stdcall SelectStyleCore(void* item, void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().SelectStyleCore(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item), *reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwapChainBackgroundPanel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel>
    {
        int32_t __stdcall get_CompositionScaleX(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CompositionScaleX());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompositionScaleY(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().CompositionScaleY());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CompositionScaleChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CompositionScaleChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CompositionScaleChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CompositionScaleChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall CreateCoreIndependentInputSource(uint32_t deviceKinds, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Input::InputPointerSource>(this->shim().CreateCoreIndependentInputSource(*reinterpret_cast<winrt::Microsoft::UI::Input::InputPointerSourceDeviceKinds const*>(&deviceKinds)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics>
    {
        int32_t __stdcall get_CompositionScaleXProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompositionScaleXProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompositionScaleYProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CompositionScaleYProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl>
    {
        int32_t __stdcall get_LeftItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItems>(this->shim().LeftItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LeftItems(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LeftItems(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeItems const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItems>(this->shim().RightItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RightItems(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RightItems(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeItems const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItems>(this->shim().TopItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopItems(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopItems(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeItems const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BottomItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItems>(this->shim().BottomItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BottomItems(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BottomItems(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeItems const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Close() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Close();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics>
    {
        int32_t __stdcall get_LeftItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LeftItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RightItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RightItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BottomItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BottomItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem>
    {
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Background(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Background());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Background(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Background(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Command(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().Command());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Command(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Command(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BehaviorOnInvoked(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked>(this->shim().BehaviorOnInvoked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_BehaviorOnInvoked(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BehaviorOnInvoked(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Invoked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Invoked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::SwipeItem, winrt::Microsoft::UI::Xaml::Controls::SwipeItemInvokedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Invoked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Invoked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs>
    {
        int32_t __stdcall get_SwipeControl(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeControl>(this->shim().SwipeControl());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics>
    {
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BehaviorOnInvokedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().BehaviorOnInvokedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItems> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItems>
    {
        int32_t __stdcall get_Mode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeMode>(this->shim().Mode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Mode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Mode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SwipeMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SwipeItems>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics>
    {
        int32_t __stdcall get_ModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon>
    {
        int32_t __stdcall get_Symbol(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Symbol>(this->shim().Symbol());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Symbol(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Symbol(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Symbol const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory>
    {
        int32_t __stdcall CreateInstanceWithSymbol(int32_t symbol, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SymbolIcon>(this->shim().CreateInstanceWithSymbol(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Symbol const*>(&symbol)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource>
    {
        int32_t __stdcall get_Symbol(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Symbol>(this->shim().Symbol());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Symbol(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Symbol(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Symbol const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::SymbolIconSource>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics>
    {
        int32_t __stdcall get_SymbolProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SymbolProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics>
    {
        int32_t __stdcall get_SymbolProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SymbolProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabView>
    {
        int32_t __stdcall get_TabWidthMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode>(this->shim().TabWidthMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabWidthMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabWidthMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewCloseButtonOverlayMode>(this->shim().CloseButtonOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TabViewCloseButtonOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripHeader(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().TabStripHeader());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabStripHeader(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripHeader(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripHeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().TabStripHeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabStripHeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripHeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripFooter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().TabStripFooter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabStripFooter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripFooter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripFooterTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().TabStripFooterTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabStripFooterTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripFooterTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAddTabButtonVisible(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAddTabButtonVisible());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsAddTabButtonVisible(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsAddTabButtonVisible(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AddTabButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().AddTabButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AddTabButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddTabButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AddTabButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().AddTabButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AddTabButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddTabButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TabCloseRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabCloseRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabCloseRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabCloseRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabDroppedOutside(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabDroppedOutside(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDroppedOutsideEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabDroppedOutside(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabDroppedOutside(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_AddTabButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().AddTabButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_AddTabButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddTabButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabItemsChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabItemsChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Windows::Foundation::Collections::IVectorChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabItemsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabItemsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_TabItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().TabItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().TabItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().TabItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().TabItemTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabItemTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabItemTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanDragTabs(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanDragTabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanDragTabs(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanDragTabs(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderTabs(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanReorderTabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanReorderTabs(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanReorderTabs(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AllowDropTabs(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AllowDropTabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AllowDropTabs(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AllowDropTabs(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectedIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedIndex(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedIndex(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromIndex(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromIndex(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabDragStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabDragStarting(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragStartingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabDragStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabDragStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabDragCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabDragCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabDragCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabDragCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabStripDragOver(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabStripDragOver(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabStripDragOver(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripDragOver(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabStripDrop(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabStripDrop(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DragEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabStripDrop(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabStripDrop(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabView2>
    {
        int32_t __stdcall get_CanTearOutTabs(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanTearOutTabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanTearOutTabs(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanTearOutTabs(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TabTearOutWindowRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabTearOutWindowRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutWindowRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabTearOutWindowRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabTearOutWindowRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TabTearOutRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TabTearOutRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TabTearOutRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabTearOutRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ExternalTornOutTabsDropping(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ExternalTornOutTabsDropping(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ExternalTornOutTabsDropping(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExternalTornOutTabsDropping(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ExternalTornOutTabsDropped(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ExternalTornOutTabsDropped(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabView, winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ExternalTornOutTabsDropped(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExternalTornOutTabsDropped(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs>
    {
        int32_t __stdcall get_Items(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tabs(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Tabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().DropIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs>
    {
        int32_t __stdcall get_Items(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tabs(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Tabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().DropIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AllowDrop(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AllowDrop());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AllowDrop(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AllowDrop(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClosable(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsClosable());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsClosable(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsClosable(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabViewTemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItemTemplateSettings>(this->shim().TabViewTemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CloseRequested(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CloseRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TabViewItem, winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CloseRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsClosableProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsClosableProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabViewTemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabViewTemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings>
    {
        int32_t __stdcall get_IconElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().IconElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2>
    {
        int32_t __stdcall get_TabGeometry(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Geometry>(this->shim().TabGeometry());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TabGeometry(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TabGeometry(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Geometry const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItemTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics>
    {
        int32_t __stdcall get_IconElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconElementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2>
    {
        int32_t __stdcall get_TabGeometryProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabGeometryProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics>
    {
        int32_t __stdcall get_TabWidthModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabWidthModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripHeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabStripHeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripHeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabStripHeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripFooterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabStripFooterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabStripFooterTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabStripFooterTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsAddTabButtonVisibleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsAddTabButtonVisibleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AddTabButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AddTabButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AddTabButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AddTabButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TabItemTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TabItemTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanDragTabsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanDragTabsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderTabsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanReorderTabsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AllowDropTabsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AllowDropTabsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedIndexProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedIndexProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2>
    {
        int32_t __stdcall get_CanTearOutTabsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanTearOutTabsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tab(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItem>(this->shim().Tab());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs>
    {
        int32_t __stdcall get_DropResult(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation>(this->shim().DropResult());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tab(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItem>(this->shim().Tab());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackage>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tab(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItem>(this->shim().Tab());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tab(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TabViewItem>(this->shim().Tab());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs>
    {
        int32_t __stdcall get_Items(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tabs(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Tabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewWindowId(struct struct_Microsoft_UI_WindowId* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::WindowId>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::WindowId>(this->shim().NewWindowId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs>
    {
        int32_t __stdcall get_Items(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Tabs(uint32_t* __valueSize, void*** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            std::tie(*__valueSize, *value) = detach_abi(this->shim().Tabs());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewWindowId(struct struct_Microsoft_UI_WindowId* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::WindowId>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::WindowId>(this->shim().NewWindowId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_NewWindowId(struct struct_Microsoft_UI_WindowId value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NewWindowId(*reinterpret_cast<winrt::Microsoft::UI::WindowId const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip>
    {
        int32_t __stdcall get_Title(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Title());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Title(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Title(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Subtitle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Subtitle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Subtitle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Subtitle(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Target(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::FrameworkElement>(this->shim().Target());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Target(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Target(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TailVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipTailVisibility>(this->shim().TailVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TailVisibility(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TailVisibility(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TeachingTipTailVisibility const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ActionButtonContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ActionButtonContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButtonContent(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().ActionButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ActionButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().ActionButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ActionButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ActionButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ActionButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CloseButtonContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonContent(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().CloseButtonStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommand(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::ICommand>(this->shim().CloseButtonCommand());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ICommand const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameter(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().CloseButtonCommandParameter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CloseButtonCommandParameter(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonCommandParameter(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().PlacementMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlacementMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlacementMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShouldConstrainToRootBounds(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShouldConstrainToRootBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShouldConstrainToRootBounds(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShouldConstrainToRootBounds(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsLightDismissEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsLightDismissEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsLightDismissEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsLightDismissEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreferredPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipPlacementMode>(this->shim().PreferredPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreferredPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreferredPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TeachingTipPlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeroContentPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipHeroContentPlacementMode>(this->shim().HeroContentPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeroContentPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeroContentPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TeachingTipHeroContentPlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeroContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().HeroContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeroContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeroContent(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconSource>(this->shim().IconSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconSource(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconSource const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ActionButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ActionButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ActionButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActionButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CloseButtonClick(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CloseButtonClick(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CloseButtonClick(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CloseButtonClick(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closing(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closing(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closing(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closing(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TeachingTip, winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs>
    {
        int32_t __stdcall get_Reason(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipCloseReason>(this->shim().Reason());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs>
    {
        int32_t __stdcall get_Reason(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipCloseReason>(this->shim().Reason());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetDeferral(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Deferral>(this->shim().GetDeferral());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTip>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics>
    {
        int32_t __stdcall get_IsOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TailVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TailVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SubtitleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SubtitleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActionButtonContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActionButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActionButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActionButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ActionButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseButtonCommandParameterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CloseButtonCommandParameterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShouldConstrainToRootBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShouldConstrainToRootBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsLightDismissEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsLightDismissEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreferredPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreferredPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeroContentPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeroContentPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeroContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeroContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings>
    {
        int32_t __stdcall get_TopRightHighlightMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().TopRightHighlightMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopRightHighlightMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopRightHighlightMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopLeftHighlightMargin(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().TopLeftHighlightMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TopLeftHighlightMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TopLeftHighlightMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::IconElement>(this->shim().IconElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IconElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IconElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::IconElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TeachingTipTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics>
    {
        int32_t __stdcall get_TopRightHighlightMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopRightHighlightMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TopLeftHighlightMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TopLeftHighlightMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IconElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconElementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlock>
    {
        int32_t __stdcall get_FontSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FontSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::FontFamily>(this->shim().FontFamily());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontFamily(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontFamily(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::FontFamily const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Text::FontWeight>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontWeight>(this->shim().FontWeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontWeight(struct struct_Windows_UI_Text_FontWeight value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontWeight(*reinterpret_cast<winrt::Windows::UI::Text::FontWeight const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyle(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStyle>(this->shim().FontStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStyle(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStyle(*reinterpret_cast<winrt::Windows::UI::Text::FontStyle const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::FontStretch>(this->shim().FontStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FontStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FontStretch(*reinterpret_cast<winrt::Windows::UI::Text::FontStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().CharacterSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterSpacing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Foreground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().Foreground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Foreground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Foreground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextWrapping>(this->shim().TextWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextWrapping(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextTrimming(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextTrimming>(this->shim().TextTrimming());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextTrimming(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextTrimming(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextTrimming const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().TextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Inlines(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::InlineCollection>(this->shim().Inlines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Padding(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Padding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Padding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Padding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().LineHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategy(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::LineStackingStrategy>(this->shim().LineStackingStrategy());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LineStackingStrategy(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LineStackingStrategy(*reinterpret_cast<winrt::Microsoft::UI::Xaml::LineStackingStrategy const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSelectionEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextSelectionEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextSelectionEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextSelectionEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SelectedText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentStart(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentEnd(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().ContentEnd());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionStart(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().SelectionStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionEnd(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Documents::TextPointer>(this->shim().SelectionEnd());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_BaselineOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().BaselineOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLines(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLines());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLines(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLines(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBounds(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextLineBounds>(this->shim().TextLineBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextLineBounds(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextLineBounds(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextLineBounds const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment>(this->shim().OpticalMarginAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OpticalMarginAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OpticalMarginAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::OpticalMarginAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorFontEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorFontEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorFontEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextScaleFactorEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextScaleFactorEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextScaleFactorEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextDecorations(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Text::TextDecorations>(this->shim().TextDecorations());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextDecorations(uint32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextDecorations(*reinterpret_cast<winrt::Windows::UI::Text::TextDecorations const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmed(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextTrimmed());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().HorizontalTextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalTextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalTextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextHighlighters(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Documents::TextHighlighter>>(this->shim().TextHighlighters());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContextMenuOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContextMenuOpening(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContextMenuOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_IsTextTrimmedChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBlock, winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsTextTrimmedChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextTrimmedChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Select(void* start, void* end) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Select(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Documents::TextPointer const*>(&start), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Documents::TextPointer const*>(&end));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAlphaMask(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Composition::CompositionBrush>(this->shim().GetAlphaMask());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CopySelectionToClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CopySelectionToClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics>
    {
        int32_t __stdcall get_FontSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontFamilyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontFamilyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontWeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontWeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FontStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FontStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrappingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextWrappingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextTrimmingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextTrimmingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LineStackingStrategyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LineStackingStrategyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextSelectionEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextSelectionEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLinesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLinesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextLineBoundsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextLineBoundsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpticalMarginAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OpticalMarginAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorFontEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextScaleFactorEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextScaleFactorEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextDecorationsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextDecorationsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextTrimmedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextTrimmedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalTextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox>
    {
        int32_t __stdcall get_Text(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().Text());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Text(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Text(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().SelectedText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionLength(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionStart(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionStart(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionStart(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaxLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaxLength(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaxLength(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsReadOnly(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsReadOnly());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsReadOnly(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsReadOnly(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsReturn(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AcceptsReturn());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AcceptsReturn(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AcceptsReturn(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().TextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrapping(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextWrapping>(this->shim().TextWrapping());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextWrapping(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextWrapping(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextWrapping const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSpellCheckEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsSpellCheckEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSpellCheckEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSpellCheckEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextPredictionEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsTextPredictionEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsTextPredictionEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsTextPredictionEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScope(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Input::InputScope>(this->shim().InputScope());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_InputScope(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InputScope(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::InputScope const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().PlaceholderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderText(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderText(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColor(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColor(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColor(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocus(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().PreventKeyboardDisplayOnProgrammaticFocus());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PreventKeyboardDisplayOnProgrammaticFocus(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PreventKeyboardDisplayOnProgrammaticFocus(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsColorFontEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsColorFontEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsColorFontEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorWhenNotFocused(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush>(this->shim().SelectionHighlightColorWhenNotFocused());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionHighlightColorWhenNotFocused(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionHighlightColorWhenNotFocused(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::SolidColorBrush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextAlignment>(this->shim().HorizontalTextAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalTextAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalTextAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterCasing(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CharacterCasing>(this->shim().CharacterCasing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CharacterCasing(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CharacterCasing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CharacterCasing const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderForeground(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().PlaceholderForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanPasteClipboardContent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanPasteClipboardContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanUndo(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanUndo());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanRedo(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanRedo());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().SelectionFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionFlyout(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProofingMenuFlyout(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase>(this->shim().ProofingMenuFlyout());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Description(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Description());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Description(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Description(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TextChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ContextMenuOpening(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ContextMenuOpening(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ContextMenuOpeningEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ContextMenuOpening(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContextMenuOpening(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Paste(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Paste(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Paste(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Paste(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionStarted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionStarted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionStarted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionStarted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextCompositionEnded(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextCompositionEnded(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextCompositionEnded(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextCompositionEnded(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CopyingToClipboard(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CopyingToClipboard(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CopyingToClipboard(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CopyingToClipboard(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CuttingToClipboard(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CuttingToClipboard(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CuttingToClipboard(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CuttingToClipboard(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_BeforeTextChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().BeforeTextChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxBeforeTextChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_BeforeTextChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BeforeTextChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectionChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxSelectionChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall Select(int32_t start, int32_t length) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Select(start, length);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRectFromCharacterIndex(int32_t charIndex, bool trailingEdge, winrt::Windows::Foundation::Rect* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Rect>(this->shim().GetRectFromCharacterIndex(charIndex, trailingEdge));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLinguisticAlternativesAsync(void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<hstring>>>(this->shim().GetLinguisticAlternativesAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Undo() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Undo();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Redo() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Redo();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall PasteFromClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PasteFromClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CopySelectionToClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CopySelectionToClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall CutSelectionToClipboard() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CutSelectionToClipboard();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ClearUndoRedoHistory() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClearUndoRedoHistory();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrder(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::TextReadingOrder>(this->shim().TextReadingOrder());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TextReadingOrder(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextReadingOrder(*reinterpret_cast<winrt::Microsoft::UI::Xaml::TextReadingOrder const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DesiredCandidateWindowAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment>(this->shim().DesiredCandidateWindowAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DesiredCandidateWindowAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DesiredCandidateWindowAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CandidateWindowAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CandidateWindowBoundsChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CandidateWindowBoundsChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CandidateWindowBoundsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CandidateWindowBoundsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_TextChanging(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TextChanging(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TextBox, winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TextChanging(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TextChanging(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs>
    {
        int32_t __stdcall get_NewText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().NewText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TextBox>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs>
    {
        int32_t __stdcall get_SelectionStart(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionStart());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionLength(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().SelectionLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics>
    {
        int32_t __stdcall get_TextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaxLengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaxLengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsReadOnlyProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsReadOnlyProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AcceptsReturnProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AcceptsReturnProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextWrappingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextWrappingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsSpellCheckEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSpellCheckEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsTextPredictionEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsTextPredictionEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputScopeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InputScopeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderTextProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderTextProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PreventKeyboardDisplayOnProgrammaticFocusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PreventKeyboardDisplayOnProgrammaticFocusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsColorFontEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsColorFontEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionHighlightColorWhenNotFocusedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionHighlightColorWhenNotFocusedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalTextAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalTextAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CharacterCasingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CharacterCasingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlaceholderForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanPasteClipboardContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanPasteClipboardContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanUndoProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanUndoProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanRedoProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanRedoProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ProofingMenuFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ProofingMenuFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DescriptionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DescriptionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DesiredCandidateWindowAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DesiredCandidateWindowAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TextReadingOrderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TextReadingOrderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs>
    {
        int32_t __stdcall get_IsContentChanging(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsContentChanging());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyout>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TextCommandBarFlyout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs>
    {
        int32_t __stdcall get_StartIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().StartIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Length(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Length());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs>
    {
        int32_t __stdcall get_StartIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().StartIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Length(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Length());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs>
    {
        int32_t __stdcall get_StartIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().StartIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Length(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Length());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs>
    {
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs>
    {
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs>
    {
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs>
    {
        int32_t __stdcall get_OldTime(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().OldTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewTime(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().NewTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker>
    {
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClockIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ClockIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClockIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClockIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinuteIncrement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MinuteIncrement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinuteIncrement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinuteIncrement(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Time(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().Time());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Time(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Time(*reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode>(this->shim().LightDismissOverlayMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LightDismissOverlayMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LightDismissOverlayMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedTime(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>>(this->shim().SelectedTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedTime(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedTime(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TimeChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TimeChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerValueChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TimeChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TimeChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_SelectedTimeChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectedTimeChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePicker, winrt::Microsoft::UI::Xaml::Controls::TimePickerSelectedValueChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectedTimeChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedTimeChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TimePicker>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout>
    {
        int32_t __stdcall get_ClockIdentifier(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ClockIdentifier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClockIdentifier(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClockIdentifier(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Time(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().Time());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Time(int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Time(*reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinuteIncrement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MinuteIncrement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinuteIncrement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinuteIncrement(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_TimePicked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().TimePicked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TimePickerFlyout, winrt::Microsoft::UI::Xaml::Controls::TimePickedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_TimePicked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TimePicked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall ShowAtAsync(void* target, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>>>(this->shim().ShowAtAsync(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&target)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter>
    {
        int32_t __stdcall get_IsDefaultShadowEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDefaultShadowEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsDefaultShadowEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsDefaultShadowEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics>
    {
        int32_t __stdcall get_IsDefaultShadowEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDefaultShadowEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics>
    {
        int32_t __stdcall get_ClockIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ClockIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TimeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TimeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinuteIncrementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinuteIncrementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs>
    {
        int32_t __stdcall get_OldTime(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>>(this->shim().OldTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewTime(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::TimeSpan>>(this->shim().NewTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics>
    {
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClockIdentifierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ClockIdentifierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinuteIncrementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinuteIncrementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TimeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TimeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LightDismissOverlayModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().LightDismissOverlayModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedTimeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedTimeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs>
    {
        int32_t __stdcall get_OldTime(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().OldTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NewTime(int64_t* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().NewTime());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem>
    {
        int32_t __stdcall get_IsChecked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsChecked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsChecked(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsChecked(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ToggleMenuFlyoutItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics>
    {
        int32_t __stdcall get_IsCheckedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCheckedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton>
    {
        int32_t __stdcall get_IsChecked(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsChecked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsChecked(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsChecked(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_IsCheckedChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().IsCheckedChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton, winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButtonIsCheckedChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsCheckedChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsCheckedChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonIsCheckedChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonIsCheckedChangedEventArgs>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics>
    {
        int32_t __stdcall get_IsCheckedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsCheckedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch>
    {
        int32_t __stdcall get_IsOn(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOn());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOn(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOn(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Header(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Header());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Header(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Header(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().HeaderTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HeaderTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HeaderTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OnContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().OnContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OnContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContent(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OnContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().OnContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OnContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OffContent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().OffContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OffContent(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OffContent(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OffContentTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().OffContentTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OffContentTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OffContentTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Toggled(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Toggled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Toggled(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Toggled(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>
    {
        int32_t __stdcall OnToggled() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnToggled();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnOnContentChanged(void* oldContent, void* newContent) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnOnContentChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&oldContent), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&newContent));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnOffContentChanged(void* oldContent, void* newContent) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnOffContentChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&oldContent), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&newContent));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnHeaderChanged(void* oldContent, void* newContent) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnHeaderChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&oldContent), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&newContent));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics>
    {
        int32_t __stdcall get_IsOnProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOnProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HeaderTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OnContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OnContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OnContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OnContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OffContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OffContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OffContentTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OffContentTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip>
    {
        int32_t __stdcall get_HorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOpen(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsOpen());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsOpen(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsOpen(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Placement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode>(this->shim().Placement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Placement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Placement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementTarget(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().PlacementTarget());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlacementTarget(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlacementTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementRect(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect>>(this->shim().PlacementRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlacementRect(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlacementRect(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings>(this->shim().TemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Closed(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Closed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Opened(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Opened(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Opened(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Opened(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ToolTip>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipService> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipService>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics>
    {
        int32_t __stdcall get_PlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPlacement(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode>(this->shim().GetPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetPlacement(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetPlacementTarget(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().GetPlacementTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetPlacementTarget(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetPlacementTarget(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ToolTipProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ToolTipProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetToolTip(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetToolTip(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetToolTip(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetToolTip(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics>
    {
        int32_t __stdcall get_HorizontalOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsOpenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsOpenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementTargetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementTargetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PlacementRectProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlacementRectProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView>
    {
        int32_t __stdcall get_RootNodes(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>(this->shim().RootNodes());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionMode>(this->shim().SelectionMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedNodes(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>(this->shim().SelectedNodes());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Expand(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Expand(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Collapse(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Collapse(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SelectAll() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectAll();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ItemInvoked(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ItemInvoked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewItemInvokedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ItemInvoked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemInvoked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Expanding(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Expanding(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewExpandingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Expanding(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Expanding(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Collapsed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().Collapsed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewCollapsedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Collapsed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Collapsed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView2>
    {
        int32_t __stdcall NodeFromContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().NodeFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromNode(void* node, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromNode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const*>(&node)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ItemFromContainer(void* container, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemFromContainer(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&container)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ContainerFromItem(void* item, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().ContainerFromItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&item)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanDragItems(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanDragItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanDragItems(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanDragItems(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderItems(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanReorderItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanReorderItems(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanReorderItems(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DataTemplate>(this->shim().ItemTemplate());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplate(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DataTemplate const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector>(this->shim().ItemTemplateSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemTemplateSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemTemplateSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyle(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Style>(this->shim().ItemContainerStyle());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerStyle(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerStyle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Style const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleSelector(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StyleSelector>(this->shim().ItemContainerStyleSelector());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerStyleSelector(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerStyleSelector(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StyleSelector const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerTransitions(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection>(this->shim().ItemContainerTransitions());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemContainerTransitions(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemContainerTransitions(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DragItemsStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DragItemsStarting(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsStartingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragItemsStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragItemsStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DragItemsCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().DragItemsCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragItemsCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragItemsCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall get_SelectedNode(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().SelectedNode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedNode(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedNode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().SelectedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedItem(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().SelectedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView3>
    {
        int32_t __stdcall add_SelectionChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().SelectionChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TreeView, winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionChangedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs>
    {
        int32_t __stdcall get_Node(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().Node());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs>
    {
        int32_t __stdcall get_DropResult(uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation>(this->shim().DropResult());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Foundation::IInspectable>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2>
    {
        int32_t __stdcall get_NewParentItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().NewParentItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs>
    {
        int32_t __stdcall get_Cancel(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Cancel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Cancel(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Cancel(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::ApplicationModel::DataTransfer::DataPackage>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Items(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().Items());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs>
    {
        int32_t __stdcall get_Node(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().Node());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2>
    {
        int32_t __stdcall get_Item(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Item());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem>
    {
        int32_t __stdcall get_GlyphOpacity(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().GlyphOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GlyphOpacity(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GlyphOpacity(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphBrush(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Brush>(this->shim().GlyphBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GlyphBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GlyphBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandedGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().ExpandedGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ExpandedGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExpandedGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CollapsedGlyph(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().CollapsedGlyph());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CollapsedGlyph(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CollapsedGlyph(*reinterpret_cast<hstring const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().GlyphSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GlyphSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GlyphSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpanded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsExpanded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsExpanded(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsExpanded(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TreeViewItemTemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewItemTemplateSettings>(this->shim().TreeViewItemTemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2>
    {
        int32_t __stdcall get_HasUnrealizedChildren(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasUnrealizedChildren());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HasUnrealizedChildren(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HasUnrealizedChildren(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSource(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().ItemsSource());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsSource(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsSource(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewItem>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs>
    {
        int32_t __stdcall get_InvokedItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().InvokedItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Handled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Handled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Handled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Handled());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics>
    {
        int32_t __stdcall get_GlyphOpacityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphOpacityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandedGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExpandedGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CollapsedGlyphProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CollapsedGlyphProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GlyphSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GlyphSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpandedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsExpandedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TreeViewItemTemplateSettingsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TreeViewItemTemplateSettingsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2>
    {
        int32_t __stdcall get_HasUnrealizedChildrenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HasUnrealizedChildrenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings>
    {
        int32_t __stdcall get_ExpandedGlyphVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().ExpandedGlyphVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CollapsedGlyphVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().CollapsedGlyphVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Indentation(struct struct_Microsoft_UI_Xaml_Thickness* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().Indentation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragItemsCount(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().DragItemsCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewItemTemplateSettings>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics>
    {
        int32_t __stdcall get_ExpandedGlyphVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ExpandedGlyphVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CollapsedGlyphVisibilityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CollapsedGlyphVisibilityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IndentationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IndentationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragItemsCountProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragItemsCountProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewList> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewList>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewList>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Parent(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().Parent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpanded(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsExpanded());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsExpanded(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsExpanded(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasChildren(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasChildren());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Depth(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Depth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasUnrealizedChildren(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasUnrealizedChildren());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HasUnrealizedChildren(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HasUnrealizedChildren(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Children(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>(this->shim().Children());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DepthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DepthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsExpandedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsExpandedProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasChildrenProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HasChildrenProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs>
    {
        int32_t __stdcall get_AddedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().AddedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RemovedItems(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>>(this->shim().RemovedItems());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics>
    {
        int32_t __stdcall get_SelectedItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2>
    {
        int32_t __stdcall get_CanDragItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanDragItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanReorderItemsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanReorderItemsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemTemplateSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemTemplateSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerStyleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerStyleSelectorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerStyleSelectorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemContainerTransitionsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemContainerTransitionsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsSourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsSourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView>
    {
        int32_t __stdcall get_Pane1(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Pane1());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Pane1(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pane1(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane2(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Pane2());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Pane2(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pane2(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane1Length(struct struct_Microsoft_UI_Xaml_GridLength* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::GridLength>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::GridLength>(this->shim().Pane1Length());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Pane1Length(struct struct_Microsoft_UI_Xaml_GridLength value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pane1Length(*reinterpret_cast<winrt::Microsoft::UI::Xaml::GridLength const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane2Length(struct struct_Microsoft_UI_Xaml_GridLength* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::GridLength>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::GridLength>(this->shim().Pane2Length());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Pane2Length(struct struct_Microsoft_UI_Xaml_GridLength value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Pane2Length(*reinterpret_cast<winrt::Microsoft::UI::Xaml::GridLength const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanePriority(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority>(this->shim().PanePriority());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PanePriority(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PanePriority(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Mode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewMode>(this->shim().Mode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WideModeConfiguration(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration>(this->shim().WideModeConfiguration());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_WideModeConfiguration(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().WideModeConfiguration(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TallModeConfiguration(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration>(this->shim().TallModeConfiguration());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_TallModeConfiguration(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TallModeConfiguration(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinWideModeWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinWideModeWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinWideModeWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinWideModeWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinTallModeHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinTallModeHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinTallModeHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinTallModeHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ModeChanged(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().ModeChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::TwoPaneView, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ModeChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ModeChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::TwoPaneView>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics>
    {
        int32_t __stdcall get_Pane1Property(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().Pane1Property());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane2Property(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().Pane2Property());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane1LengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().Pane1LengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Pane2LengthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().Pane2LengthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanePriorityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PanePriorityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WideModeConfigurationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().WideModeConfigurationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_TallModeConfigurationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().TallModeConfigurationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinWideModeWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinWideModeWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinTallModeHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinTallModeHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection>
    {
        int32_t __stdcall Move(uint32_t oldIndex, uint32_t newIndex) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Move(oldIndex, newIndex);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout>
    {
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinItemWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinItemWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinItemWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinItemHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinItemHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinItemHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinRowSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinRowSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinRowSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinRowSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinColumnSpacing(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinColumnSpacing());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MinColumnSpacing(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MinColumnSpacing(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsJustification(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification>(this->shim().ItemsJustification());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsJustification(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsJustification(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsStretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch>(this->shim().ItemsStretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemsStretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemsStretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumns(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaximumRowsOrColumns());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaximumRowsOrColumns(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaximumRowsOrColumns(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics>
    {
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinItemWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinItemHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinItemHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinRowSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinRowSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinColumnSpacingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MinColumnSpacingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsJustificationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsJustificationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemsStretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemsStretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumnsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumRowsOrColumnsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUserControl> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUserControl>
    {
        int32_t __stdcall get_Content(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Content());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Content(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Content(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::UserControl>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics>
    {
        int32_t __stdcall get_ContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid>
    {
        int32_t __stdcall get_ItemHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalChildrenAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalChildrenAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalChildrenAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalChildrenAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChildrenAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalChildrenAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalChildrenAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalChildrenAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumns(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaximumRowsOrColumns());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaximumRowsOrColumns(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaximumRowsOrColumns(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics>
    {
        int32_t __stdcall get_ItemHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalChildrenAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalChildrenAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChildrenAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalChildrenAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumnsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumRowsOrColumnsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RowSpanProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RowSpanProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRowSpan(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetRowSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetRowSpan(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetRowSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ColumnSpanProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColumnSpanProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetColumnSpan(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().GetColumnSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetColumnSpan(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetColumnSpan(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IViewbox>
    {
        int32_t __stdcall get_Child(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().Child());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Child(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Child(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Stretch(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Media::Stretch>(this->shim().Stretch());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Stretch(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Stretch(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Stretch const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::StretchDirection>(this->shim().StretchDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_StretchDirection(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().StretchDirection(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::StretchDirection const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics>
    {
        int32_t __stdcall get_StretchProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_StretchDirectionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().StretchDirectionProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext>
    {
        int32_t __stdcall get_ItemCount(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetItemAt(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetItemAt(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RealizationRect(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().RealizationRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetOrCreateElementAt(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().GetOrCreateElementAt(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetOrCreateElementAt2(int32_t index, uint32_t options, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().GetOrCreateElementAt(index, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RecycleElement(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RecycleElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RecommendedAnchorIndex(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().RecommendedAnchorIndex());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutOrigin(winrt::Windows::Foundation::Point* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Point>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Point>(this->shim().LayoutOrigin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LayoutOrigin(winrt::Windows::Foundation::Point value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LayoutOrigin(*reinterpret_cast<winrt::Windows::Foundation::Point const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2>
    {
        int32_t __stdcall get_VisibleRect(winrt::Windows::Foundation::Rect* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Rect>(this->shim().VisibleRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>
    {
        int32_t __stdcall ItemCountCore(int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<int32_t>(this->shim().ItemCountCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetItemAtCore(int32_t index, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::IInspectable>(this->shim().GetItemAtCore(index));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RealizationRectCore(winrt::Windows::Foundation::Rect* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Rect>(this->shim().RealizationRectCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetOrCreateElementAtCore(int32_t index, uint32_t options, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::UIElement>(this->shim().GetOrCreateElementAtCore(index, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RecycleElementCore(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RecycleElementCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RecommendedAnchorIndexCore(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().RecommendedAnchorIndexCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_LayoutOriginCore(winrt::Windows::Foundation::Point* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Point>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Point>(this->shim().LayoutOriginCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_LayoutOriginCore(winrt::Windows::Foundation::Point value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().LayoutOriginCore(*reinterpret_cast<winrt::Windows::Foundation::Point const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>
    {
        int32_t __stdcall VisibleRectCore(winrt::Windows::Foundation::Rect* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Rect>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Rect>(this->shim().VisibleRectCore());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>
    {
        int32_t __stdcall InitializeForContextCore(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InitializeForContextCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall UninitializeForContextCore(void* context) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UninitializeForContextCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const*>(&context));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall MeasureOverride(void* context, winrt::Windows::Foundation::Size availableSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().MeasureOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&availableSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ArrangeOverride(void* context, winrt::Windows::Foundation::Size finalSize, winrt::Windows::Foundation::Size* result) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Size>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Size>(this->shim().ArrangeOverride(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::Size const*>(&finalSize)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnItemsChangedCore(void* context, void* source, void* args) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemsChangedCore(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const*>(&context), *reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&source), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Interop::NotifyCollectionChangedEventArgs const*>(&args));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel>
    {
        int32_t __stdcall get_ItemContainerGenerator(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator>(this->shim().ItemContainerGenerator());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelFactory>
    {
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>
    {
        int32_t __stdcall OnItemsChanged(void* sender, void* args) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnItemsChanged(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&sender), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs const*>(&args));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnClearChildren() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnClearChildren();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall BringIndexIntoView(int32_t index) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().BringIndexIntoView(index);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>
    {
        int32_t __stdcall AddInternalChild(void* child) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddInternalChild(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&child));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall InsertInternalChild(int32_t index, void* child) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InsertInternalChild(index, *reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&child));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall RemoveInternalChildRange(int32_t index, int32_t range) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RemoveInternalChildRange(index, range);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel>
    {
        int32_t __stdcall get_AreScrollSnapPointsRegular(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreScrollSnapPointsRegular());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreScrollSnapPointsRegular(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreScrollSnapPointsRegular(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CleanUpVirtualizedItemEvent(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CleanUpVirtualizedItemEvent(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CleanUpVirtualizedItemEvent(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CleanUpVirtualizedItemEvent(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>
    {
        int32_t __stdcall OnCleanUpVirtualizedItem(void* e) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnCleanUpVirtualizedItem(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics>
    {
        int32_t __stdcall get_AreScrollSnapPointsRegularProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreScrollSnapPointsRegularProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VirtualizationModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VirtualizationModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVirtualizationMode(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::VirtualizationMode>(this->shim().GetVirtualizationMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetVirtualizationMode(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetVirtualizationMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::VirtualizationMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsVirtualizingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsVirtualizingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsVirtualizing(void* o, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsVirtualizing(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&o)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>
    {
        int32_t __stdcall get_CoreWebView2(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::Web::WebView2::Core::CoreWebView2>(this->shim().CoreWebView2());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall EnsureCoreWebView2Async(void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().EnsureCoreWebView2Async());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ExecuteScriptAsync(void* javascriptCode, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<hstring>>(this->shim().ExecuteScriptAsync(*reinterpret_cast<hstring const*>(&javascriptCode)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Source(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Uri>(this->shim().Source());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Source(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Source(*reinterpret_cast<winrt::Windows::Foundation::Uri const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoForward(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanGoForward());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanGoForward(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanGoForward(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoBack(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanGoBack());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CanGoBack(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanGoBack(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultBackgroundColor(struct struct_Windows_UI_Color* value) noexcept final try
        {
            zero_abi<winrt::Windows::UI::Color>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::UI::Color>(this->shim().DefaultBackgroundColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DefaultBackgroundColor(struct struct_Windows_UI_Color value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DefaultBackgroundColor(*reinterpret_cast<winrt::Windows::UI::Color const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Reload() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Reload();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GoForward() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GoForward();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GoBack() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GoBack();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall NavigateToString(void* htmlContent) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigateToString(*reinterpret_cast<hstring const*>(&htmlContent));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall Close() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Close();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_NavigationCompleted(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().NavigationCompleted(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationCompletedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_NavigationCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigationCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_WebMessageReceived(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().WebMessageReceived(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2WebMessageReceivedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_WebMessageReceived(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().WebMessageReceived(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_NavigationStarting(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().NavigationStarting(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2NavigationStartingEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_NavigationStarting(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NavigationStarting(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CoreProcessFailed(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CoreProcessFailed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::Web::WebView2::Core::CoreWebView2ProcessFailedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CoreProcessFailed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CoreProcessFailed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_CoreWebView2Initialized(void* handler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().CoreWebView2Initialized(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::WebView2, winrt::Microsoft::UI::Xaml::Controls::CoreWebView2InitializedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CoreWebView2Initialized(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CoreWebView2Initialized(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWebView22> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWebView22>
    {
        int32_t __stdcall EnsureCoreWebView2WithEnvironmentAsync(void* environment, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().EnsureCoreWebView2Async(*reinterpret_cast<winrt::Microsoft::Web::WebView2::Core::CoreWebView2Environment const*>(&environment)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall EnsureCoreWebView2WithEnvironmentAndOptionsAsync(void* environment, void* controllerOptions, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().EnsureCoreWebView2Async(*reinterpret_cast<winrt::Microsoft::Web::WebView2::Core::CoreWebView2Environment const*>(&environment), *reinterpret_cast<winrt::Microsoft::Web::WebView2::Core::CoreWebView2ControllerOptions const*>(&controllerOptions)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory>
    {
        int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try
        {
            if (innerInterface) *innerInterface = nullptr;
            winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface;
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::WebView2>(this->shim().CreateInstance(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&baseInterface), winrt_impl_innerInterface));
                if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics>
    {
        int32_t __stdcall get_SourceProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoForwardProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanGoForwardProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanGoBackProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CanGoBackProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DefaultBackgroundColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DefaultBackgroundColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGrid>
    {
        int32_t __stdcall get_ItemWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemWidth(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemWidth(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ItemHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemHeight(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ItemHeight(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Orientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().Orientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Orientation(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Orientation(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalChildrenAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().HorizontalChildrenAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalChildrenAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalChildrenAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChildrenAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().VerticalChildrenAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalChildrenAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalChildrenAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumns(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().MaximumRowsOrColumns());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_MaximumRowsOrColumns(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().MaximumRowsOrColumns(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics>
    {
        int32_t __stdcall get_ItemWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ItemHeightProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ItemHeightProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OrientationProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OrientationProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalChildrenAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalChildrenAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChildrenAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalChildrenAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MaximumRowsOrColumnsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MaximumRowsOrColumnsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources>
    {
        int32_t __stdcall get_UseCompactResources(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().UseCompactResources());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_UseCompactResources(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().UseCompactResources(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics>
    {
        int32_t __stdcall EnsureRevealLights(void* element) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().EnsureRevealLights(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_UseCompactResourcesProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().UseCompactResourcesProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>
{
    auto OnClosed(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnClosed(e);
        }

        return this->shim().OnClosed(e);
    }
    auto OnOpened(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnOpened(e);
        }

        return this->shim().OnOpened(e);
    }
    auto OnClosing(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnClosing(e);
        }

        return this->shim().OnClosing(e);
    }
    auto OnOpening(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnOpening(e);
        }

        return this->shim().OnOpening(e);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>
{
    auto OnDropDownClosed(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDropDownClosed(e);
        }

        return this->shim().OnDropDownClosed(e);
    }
    auto OnDropDownOpened(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDropDownOpened(e);
        }

        return this->shim().OnDropDownOpened(e);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>
{
    auto OnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnContentChanged(oldContent, newContent);
        }

        return this->shim().OnContentChanged(oldContent, newContent);
    }
    auto OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
        }

        return this->shim().OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
    }
    auto OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
        }

        return this->shim().OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>
{
    auto OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
        }

        return this->shim().OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
    }
    auto OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
        }

        return this->shim().OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>
{
    auto OnPointerEntered(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerEntered(e);
        }

        return this->shim().OnPointerEntered(e);
    }
    auto OnPointerPressed(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerPressed(e);
        }

        return this->shim().OnPointerPressed(e);
    }
    auto OnPointerMoved(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerMoved(e);
        }

        return this->shim().OnPointerMoved(e);
    }
    auto OnPointerReleased(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerReleased(e);
        }

        return this->shim().OnPointerReleased(e);
    }
    auto OnPointerExited(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerExited(e);
        }

        return this->shim().OnPointerExited(e);
    }
    auto OnPointerCaptureLost(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerCaptureLost(e);
        }

        return this->shim().OnPointerCaptureLost(e);
    }
    auto OnPointerCanceled(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerCanceled(e);
        }

        return this->shim().OnPointerCanceled(e);
    }
    auto OnPointerWheelChanged(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPointerWheelChanged(e);
        }

        return this->shim().OnPointerWheelChanged(e);
    }
    auto OnTapped(winrt::Microsoft::UI::Xaml::Input::TappedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnTapped(e);
        }

        return this->shim().OnTapped(e);
    }
    auto OnDoubleTapped(winrt::Microsoft::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDoubleTapped(e);
        }

        return this->shim().OnDoubleTapped(e);
    }
    auto OnHolding(winrt::Microsoft::UI::Xaml::Input::HoldingRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnHolding(e);
        }

        return this->shim().OnHolding(e);
    }
    auto OnRightTapped(winrt::Microsoft::UI::Xaml::Input::RightTappedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnRightTapped(e);
        }

        return this->shim().OnRightTapped(e);
    }
    auto OnManipulationStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationStartingRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnManipulationStarting(e);
        }

        return this->shim().OnManipulationStarting(e);
    }
    auto OnManipulationInertiaStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationInertiaStartingRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnManipulationInertiaStarting(e);
        }

        return this->shim().OnManipulationInertiaStarting(e);
    }
    auto OnManipulationStarted(winrt::Microsoft::UI::Xaml::Input::ManipulationStartedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnManipulationStarted(e);
        }

        return this->shim().OnManipulationStarted(e);
    }
    auto OnManipulationDelta(winrt::Microsoft::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnManipulationDelta(e);
        }

        return this->shim().OnManipulationDelta(e);
    }
    auto OnManipulationCompleted(winrt::Microsoft::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnManipulationCompleted(e);
        }

        return this->shim().OnManipulationCompleted(e);
    }
    auto OnKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnKeyUp(e);
        }

        return this->shim().OnKeyUp(e);
    }
    auto OnKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnKeyDown(e);
        }

        return this->shim().OnKeyDown(e);
    }
    auto OnPreviewKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPreviewKeyDown(e);
        }

        return this->shim().OnPreviewKeyDown(e);
    }
    auto OnPreviewKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnPreviewKeyUp(e);
        }

        return this->shim().OnPreviewKeyUp(e);
    }
    auto OnGotFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnGotFocus(e);
        }

        return this->shim().OnGotFocus(e);
    }
    auto OnLostFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnLostFocus(e);
        }

        return this->shim().OnLostFocus(e);
    }
    auto OnCharacterReceived(winrt::Microsoft::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnCharacterReceived(e);
        }

        return this->shim().OnCharacterReceived(e);
    }
    auto OnDragEnter(winrt::Microsoft::UI::Xaml::DragEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDragEnter(e);
        }

        return this->shim().OnDragEnter(e);
    }
    auto OnDragLeave(winrt::Microsoft::UI::Xaml::DragEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDragLeave(e);
        }

        return this->shim().OnDragLeave(e);
    }
    auto OnDragOver(winrt::Microsoft::UI::Xaml::DragEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDragOver(e);
        }

        return this->shim().OnDragOver(e);
    }
    auto OnDrop(winrt::Microsoft::UI::Xaml::DragEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnDrop(e);
        }

        return this->shim().OnDrop(e);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>
{
    auto SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.SelectTemplateCore(item, container);
        }

        return this->shim().SelectTemplateCore(item, container);
    }
    auto SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.SelectTemplateCore(item);
        }

        return this->shim().SelectTemplateCore(item);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>
{
    auto SelectGroupStyleCore(winrt::Windows::Foundation::IInspectable const& group, uint32_t level)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.SelectGroupStyleCore(group, level);
        }

        return this->shim().SelectGroupStyleCore(group, level);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>
{
    auto CreateIconElementCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.CreateIconElementCore();
        }

        return this->shim().CreateIconElementCore();
    }
    auto GetIconElementPropertyCore(winrt::Microsoft::UI::Xaml::DependencyProperty const& iconSourceProperty)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.GetIconElementPropertyCore(iconSourceProperty);
        }

        return this->shim().GetIconElementPropertyCore(iconSourceProperty);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>
{
    auto ShouldAnimateCore(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const& transition)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ShouldAnimateCore(transition);
        }

        return this->shim().ShouldAnimateCore(transition);
    }
    auto StartTransitions(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition> const& transitions)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.StartTransitions(transitions);
        }

        return this->shim().StartTransitions(transitions);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>
{
    auto IsItemItsOwnContainerOverride(winrt::Windows::Foundation::IInspectable const& item)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.IsItemItsOwnContainerOverride(item);
        }

        return this->shim().IsItemItsOwnContainerOverride(item);
    }
    auto GetContainerForItemOverride()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.GetContainerForItemOverride();
        }

        return this->shim().GetContainerForItemOverride();
    }
    auto ClearContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ClearContainerForItemOverride(element, item);
        }

        return this->shim().ClearContainerForItemOverride(element, item);
    }
    auto PrepareContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.PrepareContainerForItemOverride(element, item);
        }

        return this->shim().PrepareContainerForItemOverride(element, item);
    }
    auto OnItemsChanged(winrt::Windows::Foundation::IInspectable const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemsChanged(e);
        }

        return this->shim().OnItemsChanged(e);
    }
    auto OnItemContainerStyleChanged(winrt::Microsoft::UI::Xaml::Style const& oldItemContainerStyle, winrt::Microsoft::UI::Xaml::Style const& newItemContainerStyle)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemContainerStyleChanged(oldItemContainerStyle, newItemContainerStyle);
        }

        return this->shim().OnItemContainerStyleChanged(oldItemContainerStyle, newItemContainerStyle);
    }
    auto OnItemContainerStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& oldItemContainerStyleSelector, winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& newItemContainerStyleSelector)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemContainerStyleSelectorChanged(oldItemContainerStyleSelector, newItemContainerStyleSelector);
        }

        return this->shim().OnItemContainerStyleSelectorChanged(oldItemContainerStyleSelector, newItemContainerStyleSelector);
    }
    auto OnItemTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldItemTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newItemTemplate)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemTemplateChanged(oldItemTemplate, newItemTemplate);
        }

        return this->shim().OnItemTemplateChanged(oldItemTemplate, newItemTemplate);
    }
    auto OnItemTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldItemTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newItemTemplateSelector)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemTemplateSelectorChanged(oldItemTemplateSelector, newItemTemplateSelector);
        }

        return this->shim().OnItemTemplateSelectorChanged(oldItemTemplateSelector, newItemTemplateSelector);
    }
    auto OnGroupStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& oldGroupStyleSelector, winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& newGroupStyleSelector)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnGroupStyleSelectorChanged(oldGroupStyleSelector, newGroupStyleSelector);
        }

        return this->shim().OnGroupStyleSelectorChanged(oldGroupStyleSelector, newGroupStyleSelector);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>
{
    auto CreateDefaultItemTransitionProvider()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.CreateDefaultItemTransitionProvider();
        }

        return this->shim().CreateDefaultItemTransitionProvider();
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>
{
    auto LayoutStateCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.LayoutStateCore();
        }

        return this->shim().LayoutStateCore();
    }
    auto LayoutStateCore(winrt::Windows::Foundation::IInspectable const& value)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.LayoutStateCore(value);
        }

        return this->shim().LayoutStateCore(value);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>
{
    auto InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.InitializeForContextCore(context);
        }

        return this->shim().InitializeForContextCore(context);
    }
    auto UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.UninitializeForContextCore(context);
        }

        return this->shim().UninitializeForContextCore(context);
    }
    auto MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.MeasureOverride(context, availableSize);
        }

        return this->shim().MeasureOverride(context, availableSize);
    }
    auto ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ArrangeOverride(context, finalSize);
        }

        return this->shim().ArrangeOverride(context, finalSize);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>
{
    auto ChildrenCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ChildrenCore();
        }

        return this->shim().ChildrenCore();
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>
{
    auto OnNavigatedFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnNavigatedFrom(e);
        }

        return this->shim().OnNavigatedFrom(e);
    }
    auto OnNavigatedTo(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnNavigatedTo(e);
        }

        return this->shim().OnNavigatedTo(e);
    }
    auto OnNavigatingFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnNavigatingFrom(e);
        }

        return this->shim().OnNavigatingFrom(e);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>
{
    auto SelectStyleCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.SelectStyleCore(item, container);
        }

        return this->shim().SelectStyleCore(item, container);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides>
{
    auto OnToggled()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnToggled();
        }

        return this->shim().OnToggled();
    }
    auto OnOnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnOnContentChanged(oldContent, newContent);
        }

        return this->shim().OnOnContentChanged(oldContent, newContent);
    }
    auto OnOffContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnOffContentChanged(oldContent, newContent);
        }

        return this->shim().OnOffContentChanged(oldContent, newContent);
    }
    auto OnHeaderChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnHeaderChanged(oldContent, newContent);
        }

        return this->shim().OnHeaderChanged(oldContent, newContent);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>
{
    auto InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.InitializeForContextCore(context);
        }

        return this->shim().InitializeForContextCore(context);
    }
    auto UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.UninitializeForContextCore(context);
        }

        return this->shim().UninitializeForContextCore(context);
    }
    auto MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.MeasureOverride(context, availableSize);
        }

        return this->shim().MeasureOverride(context, availableSize);
    }
    auto ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ArrangeOverride(context, finalSize);
        }

        return this->shim().ArrangeOverride(context, finalSize);
    }
    auto OnItemsChangedCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::IInspectable const& source, winrt::Microsoft::UI::Xaml::Interop::NotifyCollectionChangedEventArgs const& args)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemsChangedCore(context, source, args);
        }

        return this->shim().OnItemsChangedCore(context, source, args);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>
{
    auto ItemCountCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.ItemCountCore();
        }

        return this->shim().ItemCountCore();
    }
    auto GetItemAtCore(int32_t index)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.GetItemAtCore(index);
        }

        return this->shim().GetItemAtCore(index);
    }
    auto RealizationRectCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.RealizationRectCore();
        }

        return this->shim().RealizationRectCore();
    }
    auto GetOrCreateElementAtCore(int32_t index, winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const& options)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.GetOrCreateElementAtCore(index, options);
        }

        return this->shim().GetOrCreateElementAtCore(index, options);
    }
    auto RecycleElementCore(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.RecycleElementCore(element);
        }

        return this->shim().RecycleElementCore(element);
    }
    auto RecommendedAnchorIndexCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.RecommendedAnchorIndexCore();
        }

        return this->shim().RecommendedAnchorIndexCore();
    }
    auto LayoutOriginCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.LayoutOriginCore();
        }

        return this->shim().LayoutOriginCore();
    }
    auto LayoutOriginCore(winrt::Windows::Foundation::Point const& value)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.LayoutOriginCore(value);
        }

        return this->shim().LayoutOriginCore(value);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>
{
    auto VisibleRectCore()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.VisibleRectCore();
        }

        return this->shim().VisibleRectCore();
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>
{
    auto OnItemsChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs const& args)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnItemsChanged(sender, args);
        }

        return this->shim().OnItemsChanged(sender, args);
    }
    auto OnClearChildren()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnClearChildren();
        }

        return this->shim().OnClearChildren();
    }
    auto BringIndexIntoView(int32_t index)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.BringIndexIntoView(index);
        }

        return this->shim().BringIndexIntoView(index);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides>
{
    auto OnCleanUpVirtualizedItem(winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const& e)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnCleanUpVirtualizedItem(e);
        }

        return this->shim().OnCleanUpVirtualizedItem(e);
    }
};
}
WINRT_EXPORT namespace winrt::Microsoft::UI::Xaml::Controls
{
    constexpr auto operator|(DisabledFormattingAccelerators const left, DisabledFormattingAccelerators const right) noexcept
    {
        return static_cast<DisabledFormattingAccelerators>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(DisabledFormattingAccelerators& left, DisabledFormattingAccelerators const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(DisabledFormattingAccelerators const left, DisabledFormattingAccelerators const right) noexcept
    {
        return static_cast<DisabledFormattingAccelerators>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(DisabledFormattingAccelerators& left, DisabledFormattingAccelerators const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(DisabledFormattingAccelerators const value) noexcept
    {
        return static_cast<DisabledFormattingAccelerators>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(DisabledFormattingAccelerators const left, DisabledFormattingAccelerators const right) noexcept
    {
        return static_cast<DisabledFormattingAccelerators>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(DisabledFormattingAccelerators& left, DisabledFormattingAccelerators const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    constexpr auto operator|(ElementRealizationOptions const left, ElementRealizationOptions const right) noexcept
    {
        return static_cast<ElementRealizationOptions>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(ElementRealizationOptions& left, ElementRealizationOptions const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(ElementRealizationOptions const left, ElementRealizationOptions const right) noexcept
    {
        return static_cast<ElementRealizationOptions>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(ElementRealizationOptions& left, ElementRealizationOptions const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(ElementRealizationOptions const value) noexcept
    {
        return static_cast<ElementRealizationOptions>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(ElementRealizationOptions const left, ElementRealizationOptions const right) noexcept
    {
        return static_cast<ElementRealizationOptions>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(ElementRealizationOptions& left, ElementRealizationOptions const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    constexpr auto operator|(ItemCollectionTransitionTriggers const left, ItemCollectionTransitionTriggers const right) noexcept
    {
        return static_cast<ItemCollectionTransitionTriggers>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(ItemCollectionTransitionTriggers& left, ItemCollectionTransitionTriggers const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(ItemCollectionTransitionTriggers const left, ItemCollectionTransitionTriggers const right) noexcept
    {
        return static_cast<ItemCollectionTransitionTriggers>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(ItemCollectionTransitionTriggers& left, ItemCollectionTransitionTriggers const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(ItemCollectionTransitionTriggers const value) noexcept
    {
        return static_cast<ItemCollectionTransitionTriggers>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(ItemCollectionTransitionTriggers const left, ItemCollectionTransitionTriggers const right) noexcept
    {
        return static_cast<ItemCollectionTransitionTriggers>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(ItemCollectionTransitionTriggers& left, ItemCollectionTransitionTriggers const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    constexpr auto operator|(ScrollingInputKinds const left, ScrollingInputKinds const right) noexcept
    {
        return static_cast<ScrollingInputKinds>(impl::to_underlying_type(left) | impl::to_underlying_type(right));
    }
    constexpr auto operator|=(ScrollingInputKinds& left, ScrollingInputKinds const right) noexcept
    {
        left = left | right;
        return left;
    }
    constexpr auto operator&(ScrollingInputKinds const left, ScrollingInputKinds const right) noexcept
    {
        return static_cast<ScrollingInputKinds>(impl::to_underlying_type(left) & impl::to_underlying_type(right));
    }
    constexpr auto operator&=(ScrollingInputKinds& left, ScrollingInputKinds const right) noexcept
    {
        left = left & right;
        return left;
    }
    constexpr auto operator~(ScrollingInputKinds const value) noexcept
    {
        return static_cast<ScrollingInputKinds>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(ScrollingInputKinds const left, ScrollingInputKinds const right) noexcept
    {
        return static_cast<ScrollingInputKinds>(impl::to_underlying_type(left) ^ impl::to_underlying_type(right));
    }
    constexpr auto operator^=(ScrollingInputKinds& left, ScrollingInputKinds const right) noexcept
    {
        left = left ^ right;
        return left;
    }
    inline AnimatedIcon::AnimatedIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AnimatedIcon, IAnimatedIconFactory>([&](IAnimatedIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AnimatedIcon::StateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconStatics const&), AnimatedIcon, IAnimatedIconStatics>([](IAnimatedIconStatics const& f) { return f.StateProperty(); });
    }
    inline auto AnimatedIcon::SetState(winrt::Microsoft::UI::Xaml::DependencyObject const& object, param::hstring const& value)
    {
        impl::call_factory<AnimatedIcon, IAnimatedIconStatics>([&](IAnimatedIconStatics const& f) { return f.SetState(object, value); });
    }
    inline auto AnimatedIcon::GetState(winrt::Microsoft::UI::Xaml::DependencyObject const& object)
    {
        return impl::call_factory<AnimatedIcon, IAnimatedIconStatics>([&](IAnimatedIconStatics const& f) { return f.GetState(object); });
    }
    inline auto AnimatedIcon::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconStatics const&), AnimatedIcon, IAnimatedIconStatics>([](IAnimatedIconStatics const& f) { return f.SourceProperty(); });
    }
    inline auto AnimatedIcon::FallbackIconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconStatics const&), AnimatedIcon, IAnimatedIconStatics>([](IAnimatedIconStatics const& f) { return f.FallbackIconSourceProperty(); });
    }
    inline auto AnimatedIcon::MirroredWhenRightToLeftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconStatics const&), AnimatedIcon, IAnimatedIconStatics>([](IAnimatedIconStatics const& f) { return f.MirroredWhenRightToLeftProperty(); });
    }
    inline AnimatedIconSource::AnimatedIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AnimatedIconSource, IAnimatedIconSourceFactory>([&](IAnimatedIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AnimatedIconSource::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconSourceStatics const&), AnimatedIconSource, IAnimatedIconSourceStatics>([](IAnimatedIconSourceStatics const& f) { return f.SourceProperty(); });
    }
    inline auto AnimatedIconSource::FallbackIconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconSourceStatics const&), AnimatedIconSource, IAnimatedIconSourceStatics>([](IAnimatedIconSourceStatics const& f) { return f.FallbackIconSourceProperty(); });
    }
    inline auto AnimatedIconSource::MirroredWhenRightToLeftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedIconSourceStatics const&), AnimatedIconSource, IAnimatedIconSourceStatics>([](IAnimatedIconSourceStatics const& f) { return f.MirroredWhenRightToLeftProperty(); });
    }
    inline AnimatedVisualPlayer::AnimatedVisualPlayer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AnimatedVisualPlayer, IAnimatedVisualPlayerFactory>([&](IAnimatedVisualPlayerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AnimatedVisualPlayer::AutoPlayProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.AutoPlayProperty(); });
    }
    inline auto AnimatedVisualPlayer::DiagnosticsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.DiagnosticsProperty(); });
    }
    inline auto AnimatedVisualPlayer::DurationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.DurationProperty(); });
    }
    inline auto AnimatedVisualPlayer::FallbackContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.FallbackContentProperty(); });
    }
    inline auto AnimatedVisualPlayer::IsAnimatedVisualLoadedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.IsAnimatedVisualLoadedProperty(); });
    }
    inline auto AnimatedVisualPlayer::IsPlayingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.IsPlayingProperty(); });
    }
    inline auto AnimatedVisualPlayer::PlaybackRateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.PlaybackRateProperty(); });
    }
    inline auto AnimatedVisualPlayer::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.SourceProperty(); });
    }
    inline auto AnimatedVisualPlayer::StretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics>([](IAnimatedVisualPlayerStatics const& f) { return f.StretchProperty(); });
    }
    inline auto AnimatedVisualPlayer::AnimationOptimizationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnimatedVisualPlayerStatics2 const&), AnimatedVisualPlayer, IAnimatedVisualPlayerStatics2>([](IAnimatedVisualPlayerStatics2 const& f) { return f.AnimationOptimizationProperty(); });
    }
    inline AnnotatedScrollBar::AnnotatedScrollBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AnnotatedScrollBar, IAnnotatedScrollBarFactory>([&](IAnnotatedScrollBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AnnotatedScrollBar::LabelsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnnotatedScrollBarStatics const&), AnnotatedScrollBar, IAnnotatedScrollBarStatics>([](IAnnotatedScrollBarStatics const& f) { return f.LabelsProperty(); });
    }
    inline auto AnnotatedScrollBar::LabelTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnnotatedScrollBarStatics const&), AnnotatedScrollBar, IAnnotatedScrollBarStatics>([](IAnnotatedScrollBarStatics const& f) { return f.LabelTemplateProperty(); });
    }
    inline auto AnnotatedScrollBar::DetailLabelTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnnotatedScrollBarStatics const&), AnnotatedScrollBar, IAnnotatedScrollBarStatics>([](IAnnotatedScrollBarStatics const& f) { return f.DetailLabelTemplateProperty(); });
    }
    inline auto AnnotatedScrollBar::SmallChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAnnotatedScrollBarStatics const&), AnnotatedScrollBar, IAnnotatedScrollBarStatics>([](IAnnotatedScrollBarStatics const& f) { return f.SmallChangeProperty(); });
    }
    inline AnnotatedScrollBarLabel::AnnotatedScrollBarLabel(winrt::Windows::Foundation::IInspectable const& content, double scrollOffset) :
        AnnotatedScrollBarLabel(impl::call_factory<AnnotatedScrollBarLabel, IAnnotatedScrollBarLabelFactory>([&](IAnnotatedScrollBarLabelFactory const& f) { return f.CreateInstance(content, scrollOffset); }))
    {
    }
    inline AppBar::AppBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AppBar, IAppBarFactory>([&](IAppBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AppBar::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarStatics const&), AppBar, IAppBarStatics>([](IAppBarStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto AppBar::IsStickyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarStatics const&), AppBar, IAppBarStatics>([](IAppBarStatics const& f) { return f.IsStickyProperty(); });
    }
    inline auto AppBar::ClosedDisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarStatics const&), AppBar, IAppBarStatics>([](IAppBarStatics const& f) { return f.ClosedDisplayModeProperty(); });
    }
    inline auto AppBar::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarStatics const&), AppBar, IAppBarStatics>([](IAppBarStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline AppBarButton::AppBarButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AppBarButton, IAppBarButtonFactory>([&](IAppBarButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AppBarButton::LabelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.LabelProperty(); });
    }
    inline auto AppBarButton::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.IconProperty(); });
    }
    inline auto AppBarButton::LabelPositionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.LabelPositionProperty(); });
    }
    inline auto AppBarButton::KeyboardAcceleratorTextOverrideProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.KeyboardAcceleratorTextOverrideProperty(); });
    }
    inline auto AppBarButton::IsCompactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.IsCompactProperty(); });
    }
    inline auto AppBarButton::IsInOverflowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.IsInOverflowProperty(); });
    }
    inline auto AppBarButton::DynamicOverflowOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarButtonStatics const&), AppBarButton, IAppBarButtonStatics>([](IAppBarButtonStatics const& f) { return f.DynamicOverflowOrderProperty(); });
    }
    inline AppBarElementContainer::AppBarElementContainer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AppBarElementContainer, IAppBarElementContainerFactory>([&](IAppBarElementContainerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AppBarElementContainer::IsCompactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarElementContainerStatics const&), AppBarElementContainer, IAppBarElementContainerStatics>([](IAppBarElementContainerStatics const& f) { return f.IsCompactProperty(); });
    }
    inline auto AppBarElementContainer::IsInOverflowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarElementContainerStatics const&), AppBarElementContainer, IAppBarElementContainerStatics>([](IAppBarElementContainerStatics const& f) { return f.IsInOverflowProperty(); });
    }
    inline auto AppBarElementContainer::DynamicOverflowOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarElementContainerStatics const&), AppBarElementContainer, IAppBarElementContainerStatics>([](IAppBarElementContainerStatics const& f) { return f.DynamicOverflowOrderProperty(); });
    }
    inline AppBarSeparator::AppBarSeparator()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AppBarSeparator, IAppBarSeparatorFactory>([&](IAppBarSeparatorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AppBarSeparator::IsCompactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarSeparatorStatics const&), AppBarSeparator, IAppBarSeparatorStatics>([](IAppBarSeparatorStatics const& f) { return f.IsCompactProperty(); });
    }
    inline auto AppBarSeparator::IsInOverflowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarSeparatorStatics const&), AppBarSeparator, IAppBarSeparatorStatics>([](IAppBarSeparatorStatics const& f) { return f.IsInOverflowProperty(); });
    }
    inline auto AppBarSeparator::DynamicOverflowOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarSeparatorStatics const&), AppBarSeparator, IAppBarSeparatorStatics>([](IAppBarSeparatorStatics const& f) { return f.DynamicOverflowOrderProperty(); });
    }
    inline AppBarToggleButton::AppBarToggleButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<AppBarToggleButton, IAppBarToggleButtonFactory>([&](IAppBarToggleButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto AppBarToggleButton::LabelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.LabelProperty(); });
    }
    inline auto AppBarToggleButton::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.IconProperty(); });
    }
    inline auto AppBarToggleButton::LabelPositionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.LabelPositionProperty(); });
    }
    inline auto AppBarToggleButton::KeyboardAcceleratorTextOverrideProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.KeyboardAcceleratorTextOverrideProperty(); });
    }
    inline auto AppBarToggleButton::IsCompactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.IsCompactProperty(); });
    }
    inline auto AppBarToggleButton::IsInOverflowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.IsInOverflowProperty(); });
    }
    inline auto AppBarToggleButton::DynamicOverflowOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAppBarToggleButtonStatics const&), AppBarToggleButton, IAppBarToggleButtonStatics>([](IAppBarToggleButtonStatics const& f) { return f.DynamicOverflowOrderProperty(); });
    }
    inline AutoSuggestBox::AutoSuggestBox() :
        AutoSuggestBox(impl::call_factory_cast<AutoSuggestBox(*)(winrt::Windows::Foundation::IActivationFactory const&), AutoSuggestBox>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AutoSuggestBox>(); }))
    {
    }
    inline auto AutoSuggestBox::MaxSuggestionListHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.MaxSuggestionListHeightProperty(); });
    }
    inline auto AutoSuggestBox::IsSuggestionListOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.IsSuggestionListOpenProperty(); });
    }
    inline auto AutoSuggestBox::TextMemberPathProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.TextMemberPathProperty(); });
    }
    inline auto AutoSuggestBox::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.TextProperty(); });
    }
    inline auto AutoSuggestBox::UpdateTextOnSelectProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.UpdateTextOnSelectProperty(); });
    }
    inline auto AutoSuggestBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto AutoSuggestBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto AutoSuggestBox::AutoMaximizeSuggestionAreaProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.AutoMaximizeSuggestionAreaProperty(); });
    }
    inline auto AutoSuggestBox::TextBoxStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.TextBoxStyleProperty(); });
    }
    inline auto AutoSuggestBox::QueryIconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.QueryIconProperty(); });
    }
    inline auto AutoSuggestBox::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto AutoSuggestBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxStatics const&), AutoSuggestBox, IAutoSuggestBoxStatics>([](IAutoSuggestBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline AutoSuggestBoxQuerySubmittedEventArgs::AutoSuggestBoxQuerySubmittedEventArgs() :
        AutoSuggestBoxQuerySubmittedEventArgs(impl::call_factory_cast<AutoSuggestBoxQuerySubmittedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), AutoSuggestBoxQuerySubmittedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AutoSuggestBoxQuerySubmittedEventArgs>(); }))
    {
    }
    inline AutoSuggestBoxSuggestionChosenEventArgs::AutoSuggestBoxSuggestionChosenEventArgs() :
        AutoSuggestBoxSuggestionChosenEventArgs(impl::call_factory_cast<AutoSuggestBoxSuggestionChosenEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), AutoSuggestBoxSuggestionChosenEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AutoSuggestBoxSuggestionChosenEventArgs>(); }))
    {
    }
    inline AutoSuggestBoxTextChangedEventArgs::AutoSuggestBoxTextChangedEventArgs() :
        AutoSuggestBoxTextChangedEventArgs(impl::call_factory_cast<AutoSuggestBoxTextChangedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), AutoSuggestBoxTextChangedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<AutoSuggestBoxTextChangedEventArgs>(); }))
    {
    }
    inline auto AutoSuggestBoxTextChangedEventArgs::ReasonProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxTextChangedEventArgsStatics const&), AutoSuggestBoxTextChangedEventArgs, IAutoSuggestBoxTextChangedEventArgsStatics>([](IAutoSuggestBoxTextChangedEventArgsStatics const& f) { return f.ReasonProperty(); });
    }
    inline BitmapIcon::BitmapIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<BitmapIcon, IBitmapIconFactory>([&](IBitmapIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto BitmapIcon::UriSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBitmapIconStatics const&), BitmapIcon, IBitmapIconStatics>([](IBitmapIconStatics const& f) { return f.UriSourceProperty(); });
    }
    inline auto BitmapIcon::ShowAsMonochromeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBitmapIconStatics const&), BitmapIcon, IBitmapIconStatics>([](IBitmapIconStatics const& f) { return f.ShowAsMonochromeProperty(); });
    }
    inline BitmapIconSource::BitmapIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<BitmapIconSource, IBitmapIconSourceFactory>([&](IBitmapIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto BitmapIconSource::UriSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBitmapIconSourceStatics const&), BitmapIconSource, IBitmapIconSourceStatics>([](IBitmapIconSourceStatics const& f) { return f.UriSourceProperty(); });
    }
    inline auto BitmapIconSource::ShowAsMonochromeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBitmapIconSourceStatics const&), BitmapIconSource, IBitmapIconSourceStatics>([](IBitmapIconSourceStatics const& f) { return f.ShowAsMonochromeProperty(); });
    }
    inline Border::Border() :
        Border(impl::call_factory_cast<Border(*)(winrt::Windows::Foundation::IActivationFactory const&), Border>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<Border>(); }))
    {
    }
    inline auto Border::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto Border::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto Border::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto Border::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto Border::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto Border::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto Border::ChildTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBorderStatics const&), Border, IBorderStatics>([](IBorderStatics const& f) { return f.ChildTransitionsProperty(); });
    }
    inline BreadcrumbBar::BreadcrumbBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<BreadcrumbBar, IBreadcrumbBarFactory>([&](IBreadcrumbBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto BreadcrumbBar::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBreadcrumbBarStatics const&), BreadcrumbBar, IBreadcrumbBarStatics>([](IBreadcrumbBarStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto BreadcrumbBar::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IBreadcrumbBarStatics const&), BreadcrumbBar, IBreadcrumbBarStatics>([](IBreadcrumbBarStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline BreadcrumbBarItem::BreadcrumbBarItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<BreadcrumbBarItem, IBreadcrumbBarItemFactory>([&](IBreadcrumbBarItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline Button::Button()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Button, IButtonFactory>([&](IButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Button::FlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonStatics const&), Button, IButtonStatics>([](IButtonStatics const& f) { return f.FlyoutProperty(); });
    }
    inline CalendarDatePicker::CalendarDatePicker()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CalendarDatePicker, ICalendarDatePickerFactory>([&](ICalendarDatePickerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto CalendarDatePicker::DateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.DateProperty(); });
    }
    inline auto CalendarDatePicker::IsCalendarOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.IsCalendarOpenProperty(); });
    }
    inline auto CalendarDatePicker::DateFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.DateFormatProperty(); });
    }
    inline auto CalendarDatePicker::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto CalendarDatePicker::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto CalendarDatePicker::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto CalendarDatePicker::CalendarViewStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.CalendarViewStyleProperty(); });
    }
    inline auto CalendarDatePicker::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto CalendarDatePicker::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.DescriptionProperty(); });
    }
    inline auto CalendarDatePicker::MinDateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.MinDateProperty(); });
    }
    inline auto CalendarDatePicker::MaxDateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.MaxDateProperty(); });
    }
    inline auto CalendarDatePicker::IsTodayHighlightedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.IsTodayHighlightedProperty(); });
    }
    inline auto CalendarDatePicker::DisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.DisplayModeProperty(); });
    }
    inline auto CalendarDatePicker::FirstDayOfWeekProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.FirstDayOfWeekProperty(); });
    }
    inline auto CalendarDatePicker::DayOfWeekFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.DayOfWeekFormatProperty(); });
    }
    inline auto CalendarDatePicker::CalendarIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.CalendarIdentifierProperty(); });
    }
    inline auto CalendarDatePicker::IsOutOfScopeEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.IsOutOfScopeEnabledProperty(); });
    }
    inline auto CalendarDatePicker::IsGroupLabelVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarDatePickerStatics const&), CalendarDatePicker, ICalendarDatePickerStatics>([](ICalendarDatePickerStatics const& f) { return f.IsGroupLabelVisibleProperty(); });
    }
    inline CalendarView::CalendarView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CalendarView, ICalendarViewFactory>([&](ICalendarViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto CalendarView::CalendarIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarIdentifierProperty(); });
    }
    inline auto CalendarView::DayOfWeekFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayOfWeekFormatProperty(); });
    }
    inline auto CalendarView::IsGroupLabelVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.IsGroupLabelVisibleProperty(); });
    }
    inline auto CalendarView::DisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DisplayModeProperty(); });
    }
    inline auto CalendarView::FirstDayOfWeekProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstDayOfWeekProperty(); });
    }
    inline auto CalendarView::IsOutOfScopeEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.IsOutOfScopeEnabledProperty(); });
    }
    inline auto CalendarView::IsTodayHighlightedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.IsTodayHighlightedProperty(); });
    }
    inline auto CalendarView::MaxDateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MaxDateProperty(); });
    }
    inline auto CalendarView::MinDateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MinDateProperty(); });
    }
    inline auto CalendarView::NumberOfWeeksInViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.NumberOfWeeksInViewProperty(); });
    }
    inline auto CalendarView::SelectedDatesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedDatesProperty(); });
    }
    inline auto CalendarView::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto CalendarView::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline auto CalendarView::FocusBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FocusBorderBrushProperty(); });
    }
    inline auto CalendarView::SelectedHoverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedHoverBorderBrushProperty(); });
    }
    inline auto CalendarView::SelectedPressedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedPressedBorderBrushProperty(); });
    }
    inline auto CalendarView::SelectedDisabledBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedDisabledBorderBrushProperty(); });
    }
    inline auto CalendarView::SelectedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedBorderBrushProperty(); });
    }
    inline auto CalendarView::HoverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.HoverBorderBrushProperty(); });
    }
    inline auto CalendarView::PressedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.PressedBorderBrushProperty(); });
    }
    inline auto CalendarView::TodaySelectedInnerBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodaySelectedInnerBorderBrushProperty(); });
    }
    inline auto CalendarView::BlackoutStrikethroughBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.BlackoutStrikethroughBrushProperty(); });
    }
    inline auto CalendarView::CalendarItemBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemBorderBrushProperty(); });
    }
    inline auto CalendarView::BlackoutBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.BlackoutBackgroundProperty(); });
    }
    inline auto CalendarView::OutOfScopeBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.OutOfScopeBackgroundProperty(); });
    }
    inline auto CalendarView::CalendarItemBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemBackgroundProperty(); });
    }
    inline auto CalendarView::CalendarItemHoverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemHoverBackgroundProperty(); });
    }
    inline auto CalendarView::CalendarItemPressedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemPressedBackgroundProperty(); });
    }
    inline auto CalendarView::CalendarItemDisabledBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemDisabledBackgroundProperty(); });
    }
    inline auto CalendarView::TodayBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayBackgroundProperty(); });
    }
    inline auto CalendarView::TodayBlackoutBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayBlackoutBackgroundProperty(); });
    }
    inline auto CalendarView::TodayHoverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayHoverBackgroundProperty(); });
    }
    inline auto CalendarView::TodayPressedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayPressedBackgroundProperty(); });
    }
    inline auto CalendarView::TodayDisabledBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayDisabledBackgroundProperty(); });
    }
    inline auto CalendarView::PressedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.PressedForegroundProperty(); });
    }
    inline auto CalendarView::TodayForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayForegroundProperty(); });
    }
    inline auto CalendarView::BlackoutForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.BlackoutForegroundProperty(); });
    }
    inline auto CalendarView::TodayBlackoutForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayBlackoutForegroundProperty(); });
    }
    inline auto CalendarView::SelectedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedForegroundProperty(); });
    }
    inline auto CalendarView::SelectedHoverForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedHoverForegroundProperty(); });
    }
    inline auto CalendarView::SelectedPressedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedPressedForegroundProperty(); });
    }
    inline auto CalendarView::SelectedDisabledForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.SelectedDisabledForegroundProperty(); });
    }
    inline auto CalendarView::OutOfScopeForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.OutOfScopeForegroundProperty(); });
    }
    inline auto CalendarView::OutOfScopeHoverForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.OutOfScopeHoverForegroundProperty(); });
    }
    inline auto CalendarView::OutOfScopePressedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.OutOfScopePressedForegroundProperty(); });
    }
    inline auto CalendarView::CalendarItemForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemForegroundProperty(); });
    }
    inline auto CalendarView::DisabledForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DisabledForegroundProperty(); });
    }
    inline auto CalendarView::DayItemFontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayItemFontFamilyProperty(); });
    }
    inline auto CalendarView::DayItemFontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayItemFontSizeProperty(); });
    }
    inline auto CalendarView::DayItemFontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayItemFontStyleProperty(); });
    }
    inline auto CalendarView::DayItemFontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayItemFontWeightProperty(); });
    }
    inline auto CalendarView::TodayFontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.TodayFontWeightProperty(); });
    }
    inline auto CalendarView::FirstOfMonthLabelFontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfMonthLabelFontFamilyProperty(); });
    }
    inline auto CalendarView::FirstOfMonthLabelFontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfMonthLabelFontSizeProperty(); });
    }
    inline auto CalendarView::FirstOfMonthLabelFontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfMonthLabelFontStyleProperty(); });
    }
    inline auto CalendarView::FirstOfMonthLabelFontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfMonthLabelFontWeightProperty(); });
    }
    inline auto CalendarView::MonthYearItemFontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MonthYearItemFontFamilyProperty(); });
    }
    inline auto CalendarView::MonthYearItemFontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MonthYearItemFontSizeProperty(); });
    }
    inline auto CalendarView::MonthYearItemFontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MonthYearItemFontStyleProperty(); });
    }
    inline auto CalendarView::MonthYearItemFontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MonthYearItemFontWeightProperty(); });
    }
    inline auto CalendarView::FirstOfYearDecadeLabelFontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfYearDecadeLabelFontFamilyProperty(); });
    }
    inline auto CalendarView::FirstOfYearDecadeLabelFontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfYearDecadeLabelFontSizeProperty(); });
    }
    inline auto CalendarView::FirstOfYearDecadeLabelFontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfYearDecadeLabelFontStyleProperty(); });
    }
    inline auto CalendarView::FirstOfYearDecadeLabelFontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfYearDecadeLabelFontWeightProperty(); });
    }
    inline auto CalendarView::DayItemMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.DayItemMarginProperty(); });
    }
    inline auto CalendarView::MonthYearItemMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.MonthYearItemMarginProperty(); });
    }
    inline auto CalendarView::FirstOfMonthLabelMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfMonthLabelMarginProperty(); });
    }
    inline auto CalendarView::FirstOfYearDecadeLabelMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.FirstOfYearDecadeLabelMarginProperty(); });
    }
    inline auto CalendarView::HorizontalDayItemAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.HorizontalDayItemAlignmentProperty(); });
    }
    inline auto CalendarView::VerticalDayItemAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.VerticalDayItemAlignmentProperty(); });
    }
    inline auto CalendarView::HorizontalFirstOfMonthLabelAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.HorizontalFirstOfMonthLabelAlignmentProperty(); });
    }
    inline auto CalendarView::VerticalFirstOfMonthLabelAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.VerticalFirstOfMonthLabelAlignmentProperty(); });
    }
    inline auto CalendarView::CalendarItemBorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemBorderThicknessProperty(); });
    }
    inline auto CalendarView::CalendarViewDayItemStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarViewDayItemStyleProperty(); });
    }
    inline auto CalendarView::CalendarItemCornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewStatics const&), CalendarView, ICalendarViewStatics>([](ICalendarViewStatics const& f) { return f.CalendarItemCornerRadiusProperty(); });
    }
    inline CalendarViewDayItem::CalendarViewDayItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CalendarViewDayItem, ICalendarViewDayItemFactory>([&](ICalendarViewDayItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto CalendarViewDayItem::IsBlackoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewDayItemStatics const&), CalendarViewDayItem, ICalendarViewDayItemStatics>([](ICalendarViewDayItemStatics const& f) { return f.IsBlackoutProperty(); });
    }
    inline auto CalendarViewDayItem::DateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICalendarViewDayItemStatics const&), CalendarViewDayItem, ICalendarViewDayItemStatics>([](ICalendarViewDayItemStatics const& f) { return f.DateProperty(); });
    }
    inline Canvas::Canvas()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Canvas, ICanvasFactory>([&](ICanvasFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Canvas::LeftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICanvasStatics const&), Canvas, ICanvasStatics>([](ICanvasStatics const& f) { return f.LeftProperty(); });
    }
    inline auto Canvas::GetLeft(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.GetLeft(element); });
    }
    inline auto Canvas::SetLeft(winrt::Microsoft::UI::Xaml::UIElement const& element, double length)
    {
        impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.SetLeft(element, length); });
    }
    inline auto Canvas::TopProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICanvasStatics const&), Canvas, ICanvasStatics>([](ICanvasStatics const& f) { return f.TopProperty(); });
    }
    inline auto Canvas::GetTop(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.GetTop(element); });
    }
    inline auto Canvas::SetTop(winrt::Microsoft::UI::Xaml::UIElement const& element, double length)
    {
        impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.SetTop(element, length); });
    }
    inline auto Canvas::ZIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICanvasStatics const&), Canvas, ICanvasStatics>([](ICanvasStatics const& f) { return f.ZIndexProperty(); });
    }
    inline auto Canvas::GetZIndex(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.GetZIndex(element); });
    }
    inline auto Canvas::SetZIndex(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value)
    {
        impl::call_factory<Canvas, ICanvasStatics>([&](ICanvasStatics const& f) { return f.SetZIndex(element, value); });
    }
    inline CheckBox::CheckBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CheckBox, ICheckBoxFactory>([&](ICheckBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ChoosingGroupHeaderContainerEventArgs::ChoosingGroupHeaderContainerEventArgs() :
        ChoosingGroupHeaderContainerEventArgs(impl::call_factory_cast<ChoosingGroupHeaderContainerEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ChoosingGroupHeaderContainerEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ChoosingGroupHeaderContainerEventArgs>(); }))
    {
    }
    inline ChoosingItemContainerEventArgs::ChoosingItemContainerEventArgs() :
        ChoosingItemContainerEventArgs(impl::call_factory_cast<ChoosingItemContainerEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ChoosingItemContainerEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ChoosingItemContainerEventArgs>(); }))
    {
    }
    inline ColorPicker::ColorPicker()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ColorPicker, IColorPickerFactory>([&](IColorPickerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ColorPicker::ColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.ColorProperty(); });
    }
    inline auto ColorPicker::PreviousColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.PreviousColorProperty(); });
    }
    inline auto ColorPicker::IsAlphaEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsAlphaEnabledProperty(); });
    }
    inline auto ColorPicker::IsColorSpectrumVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsColorSpectrumVisibleProperty(); });
    }
    inline auto ColorPicker::IsColorPreviewVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsColorPreviewVisibleProperty(); });
    }
    inline auto ColorPicker::IsColorSliderVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsColorSliderVisibleProperty(); });
    }
    inline auto ColorPicker::IsAlphaSliderVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsAlphaSliderVisibleProperty(); });
    }
    inline auto ColorPicker::IsMoreButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsMoreButtonVisibleProperty(); });
    }
    inline auto ColorPicker::IsColorChannelTextInputVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsColorChannelTextInputVisibleProperty(); });
    }
    inline auto ColorPicker::IsAlphaTextInputVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsAlphaTextInputVisibleProperty(); });
    }
    inline auto ColorPicker::IsHexInputVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.IsHexInputVisibleProperty(); });
    }
    inline auto ColorPicker::MinHueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MinHueProperty(); });
    }
    inline auto ColorPicker::MaxHueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MaxHueProperty(); });
    }
    inline auto ColorPicker::MinSaturationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MinSaturationProperty(); });
    }
    inline auto ColorPicker::MaxSaturationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MaxSaturationProperty(); });
    }
    inline auto ColorPicker::MinValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MinValueProperty(); });
    }
    inline auto ColorPicker::MaxValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.MaxValueProperty(); });
    }
    inline auto ColorPicker::ColorSpectrumShapeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.ColorSpectrumShapeProperty(); });
    }
    inline auto ColorPicker::ColorSpectrumComponentsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics const&), ColorPicker, IColorPickerStatics>([](IColorPickerStatics const& f) { return f.ColorSpectrumComponentsProperty(); });
    }
    inline auto ColorPicker::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerStatics2 const&), ColorPicker, IColorPickerStatics2>([](IColorPickerStatics2 const& f) { return f.OrientationProperty(); });
    }
    inline ColumnDefinition::ColumnDefinition() :
        ColumnDefinition(impl::call_factory_cast<ColumnDefinition(*)(winrt::Windows::Foundation::IActivationFactory const&), ColumnDefinition>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ColumnDefinition>(); }))
    {
    }
    inline auto ColumnDefinition::WidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnDefinitionStatics const&), ColumnDefinition, IColumnDefinitionStatics>([](IColumnDefinitionStatics const& f) { return f.WidthProperty(); });
    }
    inline auto ColumnDefinition::MaxWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnDefinitionStatics const&), ColumnDefinition, IColumnDefinitionStatics>([](IColumnDefinitionStatics const& f) { return f.MaxWidthProperty(); });
    }
    inline auto ColumnDefinition::MinWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnDefinitionStatics const&), ColumnDefinition, IColumnDefinitionStatics>([](IColumnDefinitionStatics const& f) { return f.MinWidthProperty(); });
    }
    inline ComboBox::ComboBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ComboBox, IComboBoxFactory>([&](IComboBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ComboBox::IsEditableProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.IsEditableProperty(); });
    }
    inline auto ComboBox::IsDropDownOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.IsDropDownOpenProperty(); });
    }
    inline auto ComboBox::MaxDropDownHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.MaxDropDownHeightProperty(); });
    }
    inline auto ComboBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto ComboBox::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto ComboBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto ComboBox::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto ComboBox::IsTextSearchEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.IsTextSearchEnabledProperty(); });
    }
    inline auto ComboBox::SelectionChangedTriggerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.SelectionChangedTriggerProperty(); });
    }
    inline auto ComboBox::PlaceholderForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.PlaceholderForegroundProperty(); });
    }
    inline auto ComboBox::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.TextProperty(); });
    }
    inline auto ComboBox::TextBoxStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.TextBoxStyleProperty(); });
    }
    inline auto ComboBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxStatics const&), ComboBox, IComboBoxStatics>([](IComboBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline ComboBoxItem::ComboBoxItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ComboBoxItem, IComboBoxItemFactory>([&](IComboBoxItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline CommandBar::CommandBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CommandBar, ICommandBarFactory>([&](ICommandBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto CommandBar::PrimaryCommandsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.PrimaryCommandsProperty(); });
    }
    inline auto CommandBar::SecondaryCommandsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.SecondaryCommandsProperty(); });
    }
    inline auto CommandBar::CommandBarOverflowPresenterStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.CommandBarOverflowPresenterStyleProperty(); });
    }
    inline auto CommandBar::DefaultLabelPositionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.DefaultLabelPositionProperty(); });
    }
    inline auto CommandBar::OverflowButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.OverflowButtonVisibilityProperty(); });
    }
    inline auto CommandBar::IsDynamicOverflowEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarStatics const&), CommandBar, ICommandBarStatics>([](ICommandBarStatics const& f) { return f.IsDynamicOverflowEnabledProperty(); });
    }
    inline CommandBarFlyout::CommandBarFlyout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CommandBarFlyout, ICommandBarFlyoutFactory>([&](ICommandBarFlyoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline CommandBarOverflowPresenter::CommandBarOverflowPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CommandBarOverflowPresenter, ICommandBarOverflowPresenterFactory>([&](ICommandBarOverflowPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ContainerContentChangingEventArgs::ContainerContentChangingEventArgs() :
        ContainerContentChangingEventArgs(impl::call_factory_cast<ContainerContentChangingEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ContainerContentChangingEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ContainerContentChangingEventArgs>(); }))
    {
    }
    inline ContentControl::ContentControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ContentControl, IContentControlFactory>([&](IContentControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ContentControl::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentControlStatics const&), ContentControl, IContentControlStatics>([](IContentControlStatics const& f) { return f.ContentProperty(); });
    }
    inline auto ContentControl::ContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentControlStatics const&), ContentControl, IContentControlStatics>([](IContentControlStatics const& f) { return f.ContentTemplateProperty(); });
    }
    inline auto ContentControl::ContentTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentControlStatics const&), ContentControl, IContentControlStatics>([](IContentControlStatics const& f) { return f.ContentTemplateSelectorProperty(); });
    }
    inline auto ContentControl::ContentTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentControlStatics const&), ContentControl, IContentControlStatics>([](IContentControlStatics const& f) { return f.ContentTransitionsProperty(); });
    }
    inline ContentDialog::ContentDialog()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ContentDialog, IContentDialogFactory>([&](IContentDialogFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ContentDialog::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.TitleProperty(); });
    }
    inline auto ContentDialog::TitleTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.TitleTemplateProperty(); });
    }
    inline auto ContentDialog::FullSizeDesiredProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.FullSizeDesiredProperty(); });
    }
    inline auto ContentDialog::PrimaryButtonTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.PrimaryButtonTextProperty(); });
    }
    inline auto ContentDialog::SecondaryButtonTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.SecondaryButtonTextProperty(); });
    }
    inline auto ContentDialog::CloseButtonTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.CloseButtonTextProperty(); });
    }
    inline auto ContentDialog::PrimaryButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.PrimaryButtonCommandProperty(); });
    }
    inline auto ContentDialog::SecondaryButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.SecondaryButtonCommandProperty(); });
    }
    inline auto ContentDialog::CloseButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.CloseButtonCommandProperty(); });
    }
    inline auto ContentDialog::PrimaryButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.PrimaryButtonCommandParameterProperty(); });
    }
    inline auto ContentDialog::SecondaryButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.SecondaryButtonCommandParameterProperty(); });
    }
    inline auto ContentDialog::CloseButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.CloseButtonCommandParameterProperty(); });
    }
    inline auto ContentDialog::IsPrimaryButtonEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.IsPrimaryButtonEnabledProperty(); });
    }
    inline auto ContentDialog::IsSecondaryButtonEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.IsSecondaryButtonEnabledProperty(); });
    }
    inline auto ContentDialog::PrimaryButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.PrimaryButtonStyleProperty(); });
    }
    inline auto ContentDialog::SecondaryButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.SecondaryButtonStyleProperty(); });
    }
    inline auto ContentDialog::CloseButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.CloseButtonStyleProperty(); });
    }
    inline auto ContentDialog::DefaultButtonProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentDialogStatics const&), ContentDialog, IContentDialogStatics>([](IContentDialogStatics const& f) { return f.DefaultButtonProperty(); });
    }
    inline ContentPresenter::ContentPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ContentPresenter, IContentPresenterFactory>([&](IContentPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ContentPresenter::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.ContentProperty(); });
    }
    inline auto ContentPresenter::ContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.ContentTemplateProperty(); });
    }
    inline auto ContentPresenter::ContentTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.ContentTemplateSelectorProperty(); });
    }
    inline auto ContentPresenter::ContentTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.ContentTransitionsProperty(); });
    }
    inline auto ContentPresenter::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto ContentPresenter::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto ContentPresenter::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto ContentPresenter::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto ContentPresenter::FontStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.FontStretchProperty(); });
    }
    inline auto ContentPresenter::CharacterSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.CharacterSpacingProperty(); });
    }
    inline auto ContentPresenter::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto ContentPresenter::OpticalMarginAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.OpticalMarginAlignmentProperty(); });
    }
    inline auto ContentPresenter::TextLineBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.TextLineBoundsProperty(); });
    }
    inline auto ContentPresenter::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto ContentPresenter::TextWrappingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.TextWrappingProperty(); });
    }
    inline auto ContentPresenter::MaxLinesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.MaxLinesProperty(); });
    }
    inline auto ContentPresenter::LineStackingStrategyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.LineStackingStrategyProperty(); });
    }
    inline auto ContentPresenter::LineHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.LineHeightProperty(); });
    }
    inline auto ContentPresenter::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto ContentPresenter::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto ContentPresenter::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto ContentPresenter::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto ContentPresenter::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto ContentPresenter::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto ContentPresenter::HorizontalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.HorizontalContentAlignmentProperty(); });
    }
    inline auto ContentPresenter::VerticalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IContentPresenterStatics const&), ContentPresenter, IContentPresenterStatics>([](IContentPresenterStatics const& f) { return f.VerticalContentAlignmentProperty(); });
    }
    inline auto Control::IsFocusEngagementEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsFocusEngagementEnabledProperty(); });
    }
    inline auto Control::IsFocusEngagedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsFocusEngagedProperty(); });
    }
    inline auto Control::RequiresPointerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.RequiresPointerProperty(); });
    }
    inline auto Control::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto Control::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto Control::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto Control::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto Control::FontStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.FontStretchProperty(); });
    }
    inline auto Control::CharacterSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.CharacterSpacingProperty(); });
    }
    inline auto Control::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto Control::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto Control::IsEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsEnabledProperty(); });
    }
    inline auto Control::TabNavigationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.TabNavigationProperty(); });
    }
    inline auto Control::TemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.TemplateProperty(); });
    }
    inline auto Control::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto Control::HorizontalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.HorizontalContentAlignmentProperty(); });
    }
    inline auto Control::VerticalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.VerticalContentAlignmentProperty(); });
    }
    inline auto Control::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto Control::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto Control::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto Control::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto Control::DefaultStyleKeyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.DefaultStyleKeyProperty(); });
    }
    inline auto Control::DefaultStyleResourceUriProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.DefaultStyleResourceUriProperty(); });
    }
    inline auto Control::ElementSoundModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.ElementSoundModeProperty(); });
    }
    inline auto Control::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto Control::IsTemplateFocusTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsTemplateFocusTargetProperty(); });
    }
    inline auto Control::GetIsTemplateFocusTarget(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Control, IControlStatics>([&](IControlStatics const& f) { return f.GetIsTemplateFocusTarget(element); });
    }
    inline auto Control::SetIsTemplateFocusTarget(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, bool value)
    {
        impl::call_factory<Control, IControlStatics>([&](IControlStatics const& f) { return f.SetIsTemplateFocusTarget(element, value); });
    }
    inline auto Control::IsTemplateKeyTipTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IControlStatics const&), Control, IControlStatics>([](IControlStatics const& f) { return f.IsTemplateKeyTipTargetProperty(); });
    }
    inline auto Control::GetIsTemplateKeyTipTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<Control, IControlStatics>([&](IControlStatics const& f) { return f.GetIsTemplateKeyTipTarget(element); });
    }
    inline auto Control::SetIsTemplateKeyTipTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool value)
    {
        impl::call_factory<Control, IControlStatics>([&](IControlStatics const& f) { return f.SetIsTemplateKeyTipTarget(element, value); });
    }
    inline ControlTemplate::ControlTemplate() :
        ControlTemplate(impl::call_factory_cast<ControlTemplate(*)(winrt::Windows::Foundation::IActivationFactory const&), ControlTemplate>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ControlTemplate>(); }))
    {
    }
    inline DataTemplateSelector::DataTemplateSelector()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DataTemplateSelector, IDataTemplateSelectorFactory>([&](IDataTemplateSelectorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline DatePickedEventArgs::DatePickedEventArgs() :
        DatePickedEventArgs(impl::call_factory_cast<DatePickedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), DatePickedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<DatePickedEventArgs>(); }))
    {
    }
    inline DatePicker::DatePicker()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DatePicker, IDatePickerFactory>([&](IDatePickerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto DatePicker::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto DatePicker::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto DatePicker::CalendarIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.CalendarIdentifierProperty(); });
    }
    inline auto DatePicker::DateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.DateProperty(); });
    }
    inline auto DatePicker::DayVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.DayVisibleProperty(); });
    }
    inline auto DatePicker::MonthVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.MonthVisibleProperty(); });
    }
    inline auto DatePicker::YearVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.YearVisibleProperty(); });
    }
    inline auto DatePicker::DayFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.DayFormatProperty(); });
    }
    inline auto DatePicker::MonthFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.MonthFormatProperty(); });
    }
    inline auto DatePicker::YearFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.YearFormatProperty(); });
    }
    inline auto DatePicker::MinYearProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.MinYearProperty(); });
    }
    inline auto DatePicker::MaxYearProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.MaxYearProperty(); });
    }
    inline auto DatePicker::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto DatePicker::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto DatePicker::SelectedDateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerStatics const&), DatePicker, IDatePickerStatics>([](IDatePickerStatics const& f) { return f.SelectedDateProperty(); });
    }
    inline DatePickerFlyout::DatePickerFlyout() :
        DatePickerFlyout(impl::call_factory_cast<DatePickerFlyout(*)(winrt::Windows::Foundation::IActivationFactory const&), DatePickerFlyout>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<DatePickerFlyout>(); }))
    {
    }
    inline auto DatePickerFlyout::CalendarIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.CalendarIdentifierProperty(); });
    }
    inline auto DatePickerFlyout::DateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.DateProperty(); });
    }
    inline auto DatePickerFlyout::DayVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.DayVisibleProperty(); });
    }
    inline auto DatePickerFlyout::MonthVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.MonthVisibleProperty(); });
    }
    inline auto DatePickerFlyout::YearVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.YearVisibleProperty(); });
    }
    inline auto DatePickerFlyout::MinYearProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.MinYearProperty(); });
    }
    inline auto DatePickerFlyout::MaxYearProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.MaxYearProperty(); });
    }
    inline auto DatePickerFlyout::DayFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.DayFormatProperty(); });
    }
    inline auto DatePickerFlyout::MonthFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.MonthFormatProperty(); });
    }
    inline auto DatePickerFlyout::YearFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutStatics const&), DatePickerFlyout, IDatePickerFlyoutStatics>([](IDatePickerFlyoutStatics const& f) { return f.YearFormatProperty(); });
    }
    inline auto DatePickerFlyoutItem::PrimaryTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutItemStatics const&), DatePickerFlyoutItem, IDatePickerFlyoutItemStatics>([](IDatePickerFlyoutItemStatics const& f) { return f.PrimaryTextProperty(); });
    }
    inline auto DatePickerFlyoutItem::SecondaryTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutItemStatics const&), DatePickerFlyoutItem, IDatePickerFlyoutItemStatics>([](IDatePickerFlyoutItemStatics const& f) { return f.SecondaryTextProperty(); });
    }
    inline auto DatePickerFlyoutPresenter::IsDefaultShadowEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IDatePickerFlyoutPresenterStatics const&), DatePickerFlyoutPresenter, IDatePickerFlyoutPresenterStatics>([](IDatePickerFlyoutPresenterStatics const& f) { return f.IsDefaultShadowEnabledProperty(); });
    }
    inline DragItemsStartingEventArgs::DragItemsStartingEventArgs() :
        DragItemsStartingEventArgs(impl::call_factory_cast<DragItemsStartingEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), DragItemsStartingEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<DragItemsStartingEventArgs>(); }))
    {
    }
    inline DropDownButton::DropDownButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DropDownButton, IDropDownButtonFactory>([&](IDropDownButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline DynamicOverflowItemsChangingEventArgs::DynamicOverflowItemsChangingEventArgs() :
        DynamicOverflowItemsChangingEventArgs(impl::call_factory_cast<DynamicOverflowItemsChangingEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), DynamicOverflowItemsChangingEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<DynamicOverflowItemsChangingEventArgs>(); }))
    {
    }
    inline Expander::Expander()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Expander, IExpanderFactory>([&](IExpanderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Expander::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IExpanderStatics const&), Expander, IExpanderStatics>([](IExpanderStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto Expander::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IExpanderStatics const&), Expander, IExpanderStatics>([](IExpanderStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto Expander::HeaderTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IExpanderStatics const&), Expander, IExpanderStatics>([](IExpanderStatics const& f) { return f.HeaderTemplateSelectorProperty(); });
    }
    inline auto Expander::IsExpandedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IExpanderStatics const&), Expander, IExpanderStatics>([](IExpanderStatics const& f) { return f.IsExpandedProperty(); });
    }
    inline auto Expander::ExpandDirectionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IExpanderStatics const&), Expander, IExpanderStatics>([](IExpanderStatics const& f) { return f.ExpandDirectionProperty(); });
    }
    inline FlipView::FlipView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FlipView, IFlipViewFactory>([&](IFlipViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto FlipView::UseTouchAnimationsForAllNavigationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlipViewStatics const&), FlipView, IFlipViewStatics>([](IFlipViewStatics const& f) { return f.UseTouchAnimationsForAllNavigationProperty(); });
    }
    inline FlipViewItem::FlipViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FlipViewItem, IFlipViewItemFactory>([&](IFlipViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline Flyout::Flyout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Flyout, IFlyoutFactory>([&](IFlyoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Flyout::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutStatics const&), Flyout, IFlyoutStatics>([](IFlyoutStatics const& f) { return f.ContentProperty(); });
    }
    inline auto Flyout::FlyoutPresenterStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutStatics const&), Flyout, IFlyoutStatics>([](IFlyoutStatics const& f) { return f.FlyoutPresenterStyleProperty(); });
    }
    inline FlyoutPresenter::FlyoutPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FlyoutPresenter, IFlyoutPresenterFactory>([&](IFlyoutPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto FlyoutPresenter::IsDefaultShadowEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutPresenterStatics const&), FlyoutPresenter, IFlyoutPresenterStatics>([](IFlyoutPresenterStatics const& f) { return f.IsDefaultShadowEnabledProperty(); });
    }
    inline FontIcon::FontIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FontIcon, IFontIconFactory>([&](IFontIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto FontIcon::GlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.GlyphProperty(); });
    }
    inline auto FontIcon::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto FontIcon::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto FontIcon::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto FontIcon::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto FontIcon::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto FontIcon::MirroredWhenRightToLeftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconStatics const&), FontIcon, IFontIconStatics>([](IFontIconStatics const& f) { return f.MirroredWhenRightToLeftProperty(); });
    }
    inline FontIconSource::FontIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FontIconSource, IFontIconSourceFactory>([&](IFontIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto FontIconSource::GlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.GlyphProperty(); });
    }
    inline auto FontIconSource::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto FontIconSource::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto FontIconSource::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto FontIconSource::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto FontIconSource::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto FontIconSource::MirroredWhenRightToLeftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFontIconSourceStatics const&), FontIconSource, IFontIconSourceStatics>([](IFontIconSourceStatics const& f) { return f.MirroredWhenRightToLeftProperty(); });
    }
    inline Frame::Frame()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Frame, IFrameFactory>([&](IFrameFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Frame::CacheSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.CacheSizeProperty(); });
    }
    inline auto Frame::CanGoBackProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.CanGoBackProperty(); });
    }
    inline auto Frame::CanGoForwardProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.CanGoForwardProperty(); });
    }
    inline auto Frame::CurrentSourcePageTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.CurrentSourcePageTypeProperty(); });
    }
    inline auto Frame::SourcePageTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.SourcePageTypeProperty(); });
    }
    inline auto Frame::BackStackDepthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.BackStackDepthProperty(); });
    }
    inline auto Frame::BackStackProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.BackStackProperty(); });
    }
    inline auto Frame::ForwardStackProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.ForwardStackProperty(); });
    }
    inline auto Frame::IsNavigationStackEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFrameStatics const&), Frame, IFrameStatics>([](IFrameStatics const& f) { return f.IsNavigationStackEnabledProperty(); });
    }
    inline Grid::Grid()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Grid, IGridFactory>([&](IGridFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Grid::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto Grid::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto Grid::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto Grid::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto Grid::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto Grid::RowSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.RowSpacingProperty(); });
    }
    inline auto Grid::ColumnSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.ColumnSpacingProperty(); });
    }
    inline auto Grid::RowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.RowProperty(); });
    }
    inline auto Grid::GetRow(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.GetRow(element); });
    }
    inline auto Grid::SetRow(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value)
    {
        impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.SetRow(element, value); });
    }
    inline auto Grid::ColumnProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.ColumnProperty(); });
    }
    inline auto Grid::GetColumn(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.GetColumn(element); });
    }
    inline auto Grid::SetColumn(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value)
    {
        impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.SetColumn(element, value); });
    }
    inline auto Grid::RowSpanProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.RowSpanProperty(); });
    }
    inline auto Grid::GetRowSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.GetRowSpan(element); });
    }
    inline auto Grid::SetRowSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value)
    {
        impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.SetRowSpan(element, value); });
    }
    inline auto Grid::ColumnSpanProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridStatics const&), Grid, IGridStatics>([](IGridStatics const& f) { return f.ColumnSpanProperty(); });
    }
    inline auto Grid::GetColumnSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.GetColumnSpan(element); });
    }
    inline auto Grid::SetColumnSpan(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, int32_t value)
    {
        impl::call_factory<Grid, IGridStatics>([&](IGridStatics const& f) { return f.SetColumnSpan(element, value); });
    }
    inline GridView::GridView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GridView, IGridViewFactory>([&](IGridViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline GridViewHeaderItem::GridViewHeaderItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GridViewHeaderItem, IGridViewHeaderItemFactory>([&](IGridViewHeaderItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline GridViewItem::GridViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GridViewItem, IGridViewItemFactory>([&](IGridViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline GroupItem::GroupItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GroupItem, IGroupItemFactory>([&](IGroupItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline GroupStyle::GroupStyle()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GroupStyle, IGroupStyleFactory>([&](IGroupStyleFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline GroupStyleSelector::GroupStyleSelector()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GroupStyleSelector, IGroupStyleSelectorFactory>([&](IGroupStyleSelectorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline Hub::Hub()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Hub, IHubFactory>([&](IHubFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Hub::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto Hub::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto Hub::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto Hub::DefaultSectionIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.DefaultSectionIndexProperty(); });
    }
    inline auto Hub::SemanticZoomOwnerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.SemanticZoomOwnerProperty(); });
    }
    inline auto Hub::IsActiveViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.IsActiveViewProperty(); });
    }
    inline auto Hub::IsZoomedInViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubStatics const&), Hub, IHubStatics>([](IHubStatics const& f) { return f.IsZoomedInViewProperty(); });
    }
    inline HubSection::HubSection()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<HubSection, IHubSectionFactory>([&](IHubSectionFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto HubSection::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubSectionStatics const&), HubSection, IHubSectionStatics>([](IHubSectionStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto HubSection::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubSectionStatics const&), HubSection, IHubSectionStatics>([](IHubSectionStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto HubSection::ContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubSectionStatics const&), HubSection, IHubSectionStatics>([](IHubSectionStatics const& f) { return f.ContentTemplateProperty(); });
    }
    inline auto HubSection::IsHeaderInteractiveProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHubSectionStatics const&), HubSection, IHubSectionStatics>([](IHubSectionStatics const& f) { return f.IsHeaderInteractiveProperty(); });
    }
    inline HubSectionHeaderClickEventArgs::HubSectionHeaderClickEventArgs() :
        HubSectionHeaderClickEventArgs(impl::call_factory_cast<HubSectionHeaderClickEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), HubSectionHeaderClickEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<HubSectionHeaderClickEventArgs>(); }))
    {
    }
    inline HyperlinkButton::HyperlinkButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<HyperlinkButton, IHyperlinkButtonFactory>([&](IHyperlinkButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto HyperlinkButton::NavigateUriProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IHyperlinkButtonStatics const&), HyperlinkButton, IHyperlinkButtonStatics>([](IHyperlinkButtonStatics const& f) { return f.NavigateUriProperty(); });
    }
    inline auto IconElement::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IIconElementStatics const&), IconElement, IIconElementStatics>([](IIconElementStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto IconSource::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IIconSourceStatics const&), IconSource, IIconSourceStatics>([](IIconSourceStatics const& f) { return f.ForegroundProperty(); });
    }
    inline IconSourceElement::IconSourceElement()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<IconSourceElement, IIconSourceElementFactory>([&](IIconSourceElementFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto IconSourceElement::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IIconSourceElementStatics const&), IconSourceElement, IIconSourceElementStatics>([](IIconSourceElementStatics const& f) { return f.IconSourceProperty(); });
    }
    inline Image::Image() :
        Image(impl::call_factory_cast<Image(*)(winrt::Windows::Foundation::IActivationFactory const&), Image>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<Image>(); }))
    {
    }
    inline auto Image::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IImageStatics const&), Image, IImageStatics>([](IImageStatics const& f) { return f.SourceProperty(); });
    }
    inline auto Image::StretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IImageStatics const&), Image, IImageStatics>([](IImageStatics const& f) { return f.StretchProperty(); });
    }
    inline auto Image::NineGridProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IImageStatics const&), Image, IImageStatics>([](IImageStatics const& f) { return f.NineGridProperty(); });
    }
    inline ImageIcon::ImageIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ImageIcon, IImageIconFactory>([&](IImageIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ImageIcon::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IImageIconStatics const&), ImageIcon, IImageIconStatics>([](IImageIconStatics const& f) { return f.SourceProperty(); });
    }
    inline ImageIconSource::ImageIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ImageIconSource, IImageIconSourceFactory>([&](IImageIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ImageIconSource::ImageSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IImageIconSourceStatics const&), ImageIconSource, IImageIconSourceStatics>([](IImageIconSourceStatics const& f) { return f.ImageSourceProperty(); });
    }
    inline InfoBadge::InfoBadge()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<InfoBadge, IInfoBadgeFactory>([&](IInfoBadgeFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto InfoBadge::ValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBadgeStatics const&), InfoBadge, IInfoBadgeStatics>([](IInfoBadgeStatics const& f) { return f.ValueProperty(); });
    }
    inline auto InfoBadge::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBadgeStatics const&), InfoBadge, IInfoBadgeStatics>([](IInfoBadgeStatics const& f) { return f.IconSourceProperty(); });
    }
    inline auto InfoBadge::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBadgeStatics const&), InfoBadge, IInfoBadgeStatics>([](IInfoBadgeStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline InfoBadgeTemplateSettings::InfoBadgeTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<InfoBadgeTemplateSettings, IInfoBadgeTemplateSettingsFactory>([&](IInfoBadgeTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto InfoBadgeTemplateSettings::InfoBadgeCornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBadgeTemplateSettingsStatics const&), InfoBadgeTemplateSettings, IInfoBadgeTemplateSettingsStatics>([](IInfoBadgeTemplateSettingsStatics const& f) { return f.InfoBadgeCornerRadiusProperty(); });
    }
    inline auto InfoBadgeTemplateSettings::IconElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBadgeTemplateSettingsStatics const&), InfoBadgeTemplateSettings, IInfoBadgeTemplateSettingsStatics>([](IInfoBadgeTemplateSettingsStatics const& f) { return f.IconElementProperty(); });
    }
    inline InfoBar::InfoBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<InfoBar, IInfoBarFactory>([&](IInfoBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto InfoBar::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto InfoBar::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.TitleProperty(); });
    }
    inline auto InfoBar::MessageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.MessageProperty(); });
    }
    inline auto InfoBar::SeverityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.SeverityProperty(); });
    }
    inline auto InfoBar::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.IconSourceProperty(); });
    }
    inline auto InfoBar::IsIconVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.IsIconVisibleProperty(); });
    }
    inline auto InfoBar::IsClosableProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.IsClosableProperty(); });
    }
    inline auto InfoBar::CloseButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.CloseButtonStyleProperty(); });
    }
    inline auto InfoBar::CloseButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.CloseButtonCommandProperty(); });
    }
    inline auto InfoBar::CloseButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.CloseButtonCommandParameterProperty(); });
    }
    inline auto InfoBar::ActionButtonProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.ActionButtonProperty(); });
    }
    inline auto InfoBar::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.ContentProperty(); });
    }
    inline auto InfoBar::ContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.ContentTemplateProperty(); });
    }
    inline auto InfoBar::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarStatics const&), InfoBar, IInfoBarStatics>([](IInfoBarStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline InfoBarTemplateSettings::InfoBarTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<InfoBarTemplateSettings, IInfoBarTemplateSettingsFactory>([&](IInfoBarTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto InfoBarTemplateSettings::IconElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarTemplateSettingsStatics const&), InfoBarTemplateSettings, IInfoBarTemplateSettingsStatics>([](IInfoBarTemplateSettingsStatics const& f) { return f.IconElementProperty(); });
    }
    inline ItemClickEventArgs::ItemClickEventArgs() :
        ItemClickEventArgs(impl::call_factory_cast<ItemClickEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemClickEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemClickEventArgs>(); }))
    {
    }
    inline ItemCollectionTransitionProvider::ItemCollectionTransitionProvider()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemCollectionTransitionProvider, IItemCollectionTransitionProviderFactory>([&](IItemCollectionTransitionProviderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ItemContainer::ItemContainer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemContainer, IItemContainerFactory>([&](IItemContainerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ItemContainer::ChildProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemContainerStatics const&), ItemContainer, IItemContainerStatics>([](IItemContainerStatics const& f) { return f.ChildProperty(); });
    }
    inline auto ItemContainer::IsSelectedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemContainerStatics const&), ItemContainer, IItemContainerStatics>([](IItemContainerStatics const& f) { return f.IsSelectedProperty(); });
    }
    inline ItemsControl::ItemsControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemsControl, IItemsControlFactory>([&](IItemsControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ItemsControl::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto ItemsControl::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto ItemsControl::ItemTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemTemplateSelectorProperty(); });
    }
    inline auto ItemsControl::ItemsPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemsPanelProperty(); });
    }
    inline auto ItemsControl::DisplayMemberPathProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.DisplayMemberPathProperty(); });
    }
    inline auto ItemsControl::ItemContainerStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemContainerStyleProperty(); });
    }
    inline auto ItemsControl::ItemContainerStyleSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemContainerStyleSelectorProperty(); });
    }
    inline auto ItemsControl::ItemContainerTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.ItemContainerTransitionsProperty(); });
    }
    inline auto ItemsControl::GroupStyleSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.GroupStyleSelectorProperty(); });
    }
    inline auto ItemsControl::IsGroupingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsControlStatics const&), ItemsControl, IItemsControlStatics>([](IItemsControlStatics const& f) { return f.IsGroupingProperty(); });
    }
    inline auto ItemsControl::GetItemsOwner(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ItemsControl, IItemsControlStatics>([&](IItemsControlStatics const& f) { return f.GetItemsOwner(element); });
    }
    inline auto ItemsControl::ItemsControlFromItemContainer(winrt::Microsoft::UI::Xaml::DependencyObject const& container)
    {
        return impl::call_factory<ItemsControl, IItemsControlStatics>([&](IItemsControlStatics const& f) { return f.ItemsControlFromItemContainer(container); });
    }
    inline ItemsPanelTemplate::ItemsPanelTemplate() :
        ItemsPanelTemplate(impl::call_factory_cast<ItemsPanelTemplate(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemsPanelTemplate>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemsPanelTemplate>(); }))
    {
    }
    inline ItemsPickedEventArgs::ItemsPickedEventArgs() :
        ItemsPickedEventArgs(impl::call_factory_cast<ItemsPickedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemsPickedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemsPickedEventArgs>(); }))
    {
    }
    inline ItemsPresenter::ItemsPresenter() :
        ItemsPresenter(impl::call_factory_cast<ItemsPresenter(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemsPresenter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemsPresenter>(); }))
    {
    }
    inline auto ItemsPresenter::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto ItemsPresenter::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto ItemsPresenter::HeaderTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.HeaderTransitionsProperty(); });
    }
    inline auto ItemsPresenter::FooterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.FooterProperty(); });
    }
    inline auto ItemsPresenter::FooterTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.FooterTemplateProperty(); });
    }
    inline auto ItemsPresenter::FooterTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.FooterTransitionsProperty(); });
    }
    inline auto ItemsPresenter::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsPresenterStatics const&), ItemsPresenter, IItemsPresenterStatics>([](IItemsPresenterStatics const& f) { return f.PaddingProperty(); });
    }
    inline ItemsRepeater::ItemsRepeater()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemsRepeater, IItemsRepeaterFactory>([&](IItemsRepeaterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ItemsRepeater::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto ItemsRepeater::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto ItemsRepeater::LayoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.LayoutProperty(); });
    }
    inline auto ItemsRepeater::HorizontalCacheLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.HorizontalCacheLengthProperty(); });
    }
    inline auto ItemsRepeater::VerticalCacheLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.VerticalCacheLengthProperty(); });
    }
    inline auto ItemsRepeater::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics const&), ItemsRepeater, IItemsRepeaterStatics>([](IItemsRepeaterStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto ItemsRepeater::ItemTransitionProviderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsRepeaterStatics2 const&), ItemsRepeater, IItemsRepeaterStatics2>([](IItemsRepeaterStatics2 const& f) { return f.ItemTransitionProviderProperty(); });
    }
    inline ItemsRepeaterScrollHost::ItemsRepeaterScrollHost() :
        ItemsRepeaterScrollHost(impl::call_factory_cast<ItemsRepeaterScrollHost(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemsRepeaterScrollHost>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemsRepeaterScrollHost>(); }))
    {
    }
    inline ItemsSourceView::ItemsSourceView(winrt::Windows::Foundation::IInspectable const& source)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemsSourceView, IItemsSourceViewFactory>([&](IItemsSourceViewFactory const& f) { return f.CreateInstance(source, baseInterface, innerInterface); });
    }
    inline ItemsStackPanel::ItemsStackPanel() :
        ItemsStackPanel(impl::call_factory_cast<ItemsStackPanel(*)(winrt::Windows::Foundation::IActivationFactory const&), ItemsStackPanel>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ItemsStackPanel>(); }))
    {
    }
    inline auto ItemsStackPanel::GroupPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsStackPanelStatics const&), ItemsStackPanel, IItemsStackPanelStatics>([](IItemsStackPanelStatics const& f) { return f.GroupPaddingProperty(); });
    }
    inline auto ItemsStackPanel::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsStackPanelStatics const&), ItemsStackPanel, IItemsStackPanelStatics>([](IItemsStackPanelStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto ItemsStackPanel::GroupHeaderPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsStackPanelStatics const&), ItemsStackPanel, IItemsStackPanelStatics>([](IItemsStackPanelStatics const& f) { return f.GroupHeaderPlacementProperty(); });
    }
    inline auto ItemsStackPanel::CacheLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsStackPanelStatics const&), ItemsStackPanel, IItemsStackPanelStatics>([](IItemsStackPanelStatics const& f) { return f.CacheLengthProperty(); });
    }
    inline auto ItemsStackPanel::AreStickyGroupHeadersEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsStackPanelStatics const&), ItemsStackPanel, IItemsStackPanelStatics>([](IItemsStackPanelStatics const& f) { return f.AreStickyGroupHeadersEnabledProperty(); });
    }
    inline ItemsView::ItemsView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemsView, IItemsViewFactory>([&](IItemsViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ItemsView::IsItemInvokedEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.IsItemInvokedEnabledProperty(); });
    }
    inline auto ItemsView::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto ItemsView::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto ItemsView::LayoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.LayoutProperty(); });
    }
    inline auto ItemsView::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto ItemsView::ItemTransitionProviderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.ItemTransitionProviderProperty(); });
    }
    inline auto ItemsView::CurrentItemIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.CurrentItemIndexProperty(); });
    }
    inline auto ItemsView::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto ItemsView::ScrollViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.ScrollViewProperty(); });
    }
    inline auto ItemsView::VerticalScrollControllerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsViewStatics const&), ItemsView, IItemsViewStatics>([](IItemsViewStatics const& f) { return f.VerticalScrollControllerProperty(); });
    }
    inline ItemsWrapGrid::ItemsWrapGrid()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ItemsWrapGrid, IItemsWrapGridFactory>([&](IItemsWrapGridFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ItemsWrapGrid::GroupPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.GroupPaddingProperty(); });
    }
    inline auto ItemsWrapGrid::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto ItemsWrapGrid::MaximumRowsOrColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.MaximumRowsOrColumnsProperty(); });
    }
    inline auto ItemsWrapGrid::ItemWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.ItemWidthProperty(); });
    }
    inline auto ItemsWrapGrid::ItemHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.ItemHeightProperty(); });
    }
    inline auto ItemsWrapGrid::GroupHeaderPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.GroupHeaderPlacementProperty(); });
    }
    inline auto ItemsWrapGrid::CacheLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.CacheLengthProperty(); });
    }
    inline auto ItemsWrapGrid::AreStickyGroupHeadersEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IItemsWrapGridStatics const&), ItemsWrapGrid, IItemsWrapGridStatics>([](IItemsWrapGridStatics const& f) { return f.AreStickyGroupHeadersEnabledProperty(); });
    }
    inline LinedFlowLayout::LinedFlowLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<LinedFlowLayout, ILinedFlowLayoutFactory>([&](ILinedFlowLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto LinedFlowLayout::ItemsJustificationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.ItemsJustificationProperty(); });
    }
    inline auto LinedFlowLayout::ItemsStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.ItemsStretchProperty(); });
    }
    inline auto LinedFlowLayout::MinItemSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.MinItemSpacingProperty(); });
    }
    inline auto LinedFlowLayout::LineSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.LineSpacingProperty(); });
    }
    inline auto LinedFlowLayout::LineHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.LineHeightProperty(); });
    }
    inline auto LinedFlowLayout::ActualLineHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILinedFlowLayoutStatics const&), LinedFlowLayout, ILinedFlowLayoutStatics>([](ILinedFlowLayoutStatics const& f) { return f.ActualLineHeightProperty(); });
    }
    inline LinedFlowLayoutItemCollectionTransitionProvider::LinedFlowLayoutItemCollectionTransitionProvider()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<LinedFlowLayoutItemCollectionTransitionProvider, ILinedFlowLayoutItemCollectionTransitionProviderFactory>([&](ILinedFlowLayoutItemCollectionTransitionProviderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ListBox::ListBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListBox, IListBoxFactory>([&](IListBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ListBox::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListBoxStatics const&), ListBox, IListBoxStatics>([](IListBoxStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto ListBox::SingleSelectionFollowsFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListBoxStatics const&), ListBox, IListBoxStatics>([](IListBoxStatics const& f) { return f.SingleSelectionFollowsFocusProperty(); });
    }
    inline ListBoxItem::ListBoxItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListBoxItem, IListBoxItemFactory>([&](IListBoxItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ListPickerFlyout::ListPickerFlyout() :
        ListPickerFlyout(impl::call_factory_cast<ListPickerFlyout(*)(winrt::Windows::Foundation::IActivationFactory const&), ListPickerFlyout>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ListPickerFlyout>(); }))
    {
    }
    inline auto ListPickerFlyout::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto ListPickerFlyout::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto ListPickerFlyout::DisplayMemberPathProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.DisplayMemberPathProperty(); });
    }
    inline auto ListPickerFlyout::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto ListPickerFlyout::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto ListPickerFlyout::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto ListPickerFlyout::SelectedValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.SelectedValueProperty(); });
    }
    inline auto ListPickerFlyout::SelectedValuePathProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListPickerFlyoutStatics const&), ListPickerFlyout, IListPickerFlyoutStatics>([](IListPickerFlyoutStatics const& f) { return f.SelectedValuePathProperty(); });
    }
    inline ListView::ListView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListView, IListViewFactory>([&](IListViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ListViewBase::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto ListViewBase::IsSwipeEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IsSwipeEnabledProperty(); });
    }
    inline auto ListViewBase::CanDragItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.CanDragItemsProperty(); });
    }
    inline auto ListViewBase::CanReorderItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.CanReorderItemsProperty(); });
    }
    inline auto ListViewBase::IsItemClickEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IsItemClickEnabledProperty(); });
    }
    inline auto ListViewBase::DataFetchSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.DataFetchSizeProperty(); });
    }
    inline auto ListViewBase::IncrementalLoadingThresholdProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IncrementalLoadingThresholdProperty(); });
    }
    inline auto ListViewBase::IncrementalLoadingTriggerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IncrementalLoadingTriggerProperty(); });
    }
    inline auto ListViewBase::ShowsScrollingPlaceholdersProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.ShowsScrollingPlaceholdersProperty(); });
    }
    inline auto ListViewBase::ReorderModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.ReorderModeProperty(); });
    }
    inline auto ListViewBase::IsMultiSelectCheckBoxEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IsMultiSelectCheckBoxEnabledProperty(); });
    }
    inline auto ListViewBase::SingleSelectionFollowsFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.SingleSelectionFollowsFocusProperty(); });
    }
    inline auto ListViewBase::SemanticZoomOwnerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.SemanticZoomOwnerProperty(); });
    }
    inline auto ListViewBase::IsActiveViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IsActiveViewProperty(); });
    }
    inline auto ListViewBase::IsZoomedInViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.IsZoomedInViewProperty(); });
    }
    inline auto ListViewBase::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto ListViewBase::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto ListViewBase::HeaderTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.HeaderTransitionsProperty(); });
    }
    inline auto ListViewBase::FooterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.FooterProperty(); });
    }
    inline auto ListViewBase::FooterTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.FooterTemplateProperty(); });
    }
    inline auto ListViewBase::FooterTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewBaseStatics const&), ListViewBase, IListViewBaseStatics>([](IListViewBaseStatics const& f) { return f.FooterTransitionsProperty(); });
    }
    inline ListViewHeaderItem::ListViewHeaderItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListViewHeaderItem, IListViewHeaderItemFactory>([&](IListViewHeaderItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ListViewItem::ListViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListViewItem, IListViewItemFactory>([&](IListViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ListViewPersistenceHelper::GetRelativeScrollPosition(winrt::Microsoft::UI::Xaml::Controls::ListViewBase const& listViewBase, winrt::Microsoft::UI::Xaml::Controls::ListViewItemToKeyHandler const& itemToKeyHandler)
    {
        return impl::call_factory<ListViewPersistenceHelper, IListViewPersistenceHelperStatics>([&](IListViewPersistenceHelperStatics const& f) { return f.GetRelativeScrollPosition(listViewBase, itemToKeyHandler); });
    }
    inline auto ListViewPersistenceHelper::SetRelativeScrollPositionAsync(winrt::Microsoft::UI::Xaml::Controls::ListViewBase const& listViewBase, param::hstring const& relativeScrollPosition, winrt::Microsoft::UI::Xaml::Controls::ListViewKeyToItemHandler const& keyToItemHandler)
    {
        return impl::call_factory<ListViewPersistenceHelper, IListViewPersistenceHelperStatics>([&](IListViewPersistenceHelperStatics const& f) { return f.SetRelativeScrollPositionAsync(listViewBase, relativeScrollPosition, keyToItemHandler); });
    }
    inline MapControl::MapControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MapControl, IMapControlFactory>([&](IMapControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MapControl::LayersProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapControlStatics const&), MapControl, IMapControlStatics>([](IMapControlStatics const& f) { return f.LayersProperty(); });
    }
    inline auto MapControl::MapServiceTokenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapControlStatics const&), MapControl, IMapControlStatics>([](IMapControlStatics const& f) { return f.MapServiceTokenProperty(); });
    }
    inline auto MapControl::CenterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapControlStatics const&), MapControl, IMapControlStatics>([](IMapControlStatics const& f) { return f.CenterProperty(); });
    }
    inline auto MapControl::ZoomLevelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapControlStatics const&), MapControl, IMapControlStatics>([](IMapControlStatics const& f) { return f.ZoomLevelProperty(); });
    }
    inline auto MapControl::InteractiveControlsVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapControlStatics const&), MapControl, IMapControlStatics>([](IMapControlStatics const& f) { return f.InteractiveControlsVisibleProperty(); });
    }
    inline MapElementsLayer::MapElementsLayer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MapElementsLayer, IMapElementsLayerFactory>([&](IMapElementsLayerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MapElementsLayer::MapElementsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapElementsLayerStatics const&), MapElementsLayer, IMapElementsLayerStatics>([](IMapElementsLayerStatics const& f) { return f.MapElementsProperty(); });
    }
    inline MapIcon::MapIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MapIcon, IMapIconFactory>([&](IMapIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MapIcon::LocationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMapIconStatics const&), MapIcon, IMapIconStatics>([](IMapIconStatics const& f) { return f.LocationProperty(); });
    }
    inline MediaPlayerElement::MediaPlayerElement()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MediaPlayerElement, IMediaPlayerElementFactory>([&](IMediaPlayerElementFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MediaPlayerElement::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.SourceProperty(); });
    }
    inline auto MediaPlayerElement::AreTransportControlsEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.AreTransportControlsEnabledProperty(); });
    }
    inline auto MediaPlayerElement::PosterSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.PosterSourceProperty(); });
    }
    inline auto MediaPlayerElement::StretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.StretchProperty(); });
    }
    inline auto MediaPlayerElement::AutoPlayProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.AutoPlayProperty(); });
    }
    inline auto MediaPlayerElement::IsFullWindowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.IsFullWindowProperty(); });
    }
    inline auto MediaPlayerElement::MediaPlayerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerElementStatics const&), MediaPlayerElement, IMediaPlayerElementStatics>([](IMediaPlayerElementStatics const& f) { return f.MediaPlayerProperty(); });
    }
    inline MediaPlayerPresenter::MediaPlayerPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MediaPlayerPresenter, IMediaPlayerPresenterFactory>([&](IMediaPlayerPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MediaPlayerPresenter::MediaPlayerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerPresenterStatics const&), MediaPlayerPresenter, IMediaPlayerPresenterStatics>([](IMediaPlayerPresenterStatics const& f) { return f.MediaPlayerProperty(); });
    }
    inline auto MediaPlayerPresenter::StretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerPresenterStatics const&), MediaPlayerPresenter, IMediaPlayerPresenterStatics>([](IMediaPlayerPresenterStatics const& f) { return f.StretchProperty(); });
    }
    inline auto MediaPlayerPresenter::IsFullWindowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaPlayerPresenterStatics const&), MediaPlayerPresenter, IMediaPlayerPresenterStatics>([](IMediaPlayerPresenterStatics const& f) { return f.IsFullWindowProperty(); });
    }
    inline MediaTransportControls::MediaTransportControls()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MediaTransportControls, IMediaTransportControlsFactory>([&](IMediaTransportControlsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MediaTransportControls::IsZoomButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsZoomButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsZoomEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsZoomEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsFastForwardButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsFastForwardButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsFastForwardEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsFastForwardEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsFastRewindButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsFastRewindButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsFastRewindEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsFastRewindEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsStopButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsStopButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsStopEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsStopEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsVolumeButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsVolumeButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsVolumeEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsVolumeEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsPlaybackRateButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsPlaybackRateButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsPlaybackRateEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsPlaybackRateEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsSeekBarVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSeekBarVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsSeekEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSeekEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsCompactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsCompactProperty(); });
    }
    inline auto MediaTransportControls::IsSkipForwardButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSkipForwardButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsSkipForwardEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSkipForwardEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsSkipBackwardButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSkipBackwardButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsSkipBackwardEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsSkipBackwardEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsNextTrackButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsNextTrackButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::IsPreviousTrackButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsPreviousTrackButtonVisibleProperty(); });
    }
    inline auto MediaTransportControls::FastPlayFallbackBehaviourProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.FastPlayFallbackBehaviourProperty(); });
    }
    inline auto MediaTransportControls::ShowAndHideAutomaticallyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.ShowAndHideAutomaticallyProperty(); });
    }
    inline auto MediaTransportControls::IsRepeatEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsRepeatEnabledProperty(); });
    }
    inline auto MediaTransportControls::IsRepeatButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsStatics const&), MediaTransportControls, IMediaTransportControlsStatics>([](IMediaTransportControlsStatics const& f) { return f.IsRepeatButtonVisibleProperty(); });
    }
    inline auto MediaTransportControlsHelper::DropoutOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMediaTransportControlsHelperStatics const&), MediaTransportControlsHelper, IMediaTransportControlsHelperStatics>([](IMediaTransportControlsHelperStatics const& f) { return f.DropoutOrderProperty(); });
    }
    inline auto MediaTransportControlsHelper::GetDropoutOrder(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<MediaTransportControlsHelper, IMediaTransportControlsHelperStatics>([&](IMediaTransportControlsHelperStatics const& f) { return f.GetDropoutOrder(element); });
    }
    inline auto MediaTransportControlsHelper::SetDropoutOrder(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IReference<int32_t> const& value)
    {
        impl::call_factory<MediaTransportControlsHelper, IMediaTransportControlsHelperStatics>([&](IMediaTransportControlsHelperStatics const& f) { return f.SetDropoutOrder(element, value); });
    }
    inline MenuBar::MenuBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuBar, IMenuBarFactory>([&](IMenuBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MenuBar::ItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuBarStatics const&), MenuBar, IMenuBarStatics>([](IMenuBarStatics const& f) { return f.ItemsProperty(); });
    }
    inline MenuBarItem::MenuBarItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuBarItem, IMenuBarItemFactory>([&](IMenuBarItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MenuBarItem::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuBarItemStatics const&), MenuBarItem, IMenuBarItemStatics>([](IMenuBarItemStatics const& f) { return f.TitleProperty(); });
    }
    inline auto MenuBarItem::ItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuBarItemStatics const&), MenuBarItem, IMenuBarItemStatics>([](IMenuBarItemStatics const& f) { return f.ItemsProperty(); });
    }
    inline MenuBarItemFlyout::MenuBarItemFlyout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuBarItemFlyout, IMenuBarItemFlyoutFactory>([&](IMenuBarItemFlyoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline MenuFlyout::MenuFlyout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuFlyout, IMenuFlyoutFactory>([&](IMenuFlyoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MenuFlyout::MenuFlyoutPresenterStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutStatics const&), MenuFlyout, IMenuFlyoutStatics>([](IMenuFlyoutStatics const& f) { return f.MenuFlyoutPresenterStyleProperty(); });
    }
    inline MenuFlyoutItem::MenuFlyoutItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuFlyoutItem, IMenuFlyoutItemFactory>([&](IMenuFlyoutItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MenuFlyoutItem::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutItemStatics const&), MenuFlyoutItem, IMenuFlyoutItemStatics>([](IMenuFlyoutItemStatics const& f) { return f.TextProperty(); });
    }
    inline auto MenuFlyoutItem::CommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutItemStatics const&), MenuFlyoutItem, IMenuFlyoutItemStatics>([](IMenuFlyoutItemStatics const& f) { return f.CommandProperty(); });
    }
    inline auto MenuFlyoutItem::CommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutItemStatics const&), MenuFlyoutItem, IMenuFlyoutItemStatics>([](IMenuFlyoutItemStatics const& f) { return f.CommandParameterProperty(); });
    }
    inline auto MenuFlyoutItem::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutItemStatics const&), MenuFlyoutItem, IMenuFlyoutItemStatics>([](IMenuFlyoutItemStatics const& f) { return f.IconProperty(); });
    }
    inline auto MenuFlyoutItem::KeyboardAcceleratorTextOverrideProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutItemStatics const&), MenuFlyoutItem, IMenuFlyoutItemStatics>([](IMenuFlyoutItemStatics const& f) { return f.KeyboardAcceleratorTextOverrideProperty(); });
    }
    inline MenuFlyoutPresenter::MenuFlyoutPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuFlyoutPresenter, IMenuFlyoutPresenterFactory>([&](IMenuFlyoutPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MenuFlyoutPresenter::IsDefaultShadowEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutPresenterStatics const&), MenuFlyoutPresenter, IMenuFlyoutPresenterStatics>([](IMenuFlyoutPresenterStatics const& f) { return f.IsDefaultShadowEnabledProperty(); });
    }
    inline auto MenuFlyoutPresenter::SystemBackdropProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutPresenterStatics2 const&), MenuFlyoutPresenter, IMenuFlyoutPresenterStatics2>([](IMenuFlyoutPresenterStatics2 const& f) { return f.SystemBackdropProperty(); });
    }
    inline MenuFlyoutSeparator::MenuFlyoutSeparator()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MenuFlyoutSeparator, IMenuFlyoutSeparatorFactory>([&](IMenuFlyoutSeparatorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline MenuFlyoutSubItem::MenuFlyoutSubItem() :
        MenuFlyoutSubItem(impl::call_factory_cast<MenuFlyoutSubItem(*)(winrt::Windows::Foundation::IActivationFactory const&), MenuFlyoutSubItem>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<MenuFlyoutSubItem>(); }))
    {
    }
    inline auto MenuFlyoutSubItem::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutSubItemStatics const&), MenuFlyoutSubItem, IMenuFlyoutSubItemStatics>([](IMenuFlyoutSubItemStatics const& f) { return f.TextProperty(); });
    }
    inline auto MenuFlyoutSubItem::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMenuFlyoutSubItemStatics const&), MenuFlyoutSubItem, IMenuFlyoutSubItemStatics>([](IMenuFlyoutSubItemStatics const& f) { return f.IconProperty(); });
    }
    inline NavigationView::NavigationView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationView, INavigationViewFactory>([&](INavigationViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NavigationView::IsPaneOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.IsPaneOpenProperty(); });
    }
    inline auto NavigationView::CompactModeThresholdWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.CompactModeThresholdWidthProperty(); });
    }
    inline auto NavigationView::ExpandedModeThresholdWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.ExpandedModeThresholdWidthProperty(); });
    }
    inline auto NavigationView::FooterMenuItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.FooterMenuItemsProperty(); });
    }
    inline auto NavigationView::FooterMenuItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.FooterMenuItemsSourceProperty(); });
    }
    inline auto NavigationView::PaneFooterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.PaneFooterProperty(); });
    }
    inline auto NavigationView::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto NavigationView::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto NavigationView::DisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.DisplayModeProperty(); });
    }
    inline auto NavigationView::IsSettingsVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.IsSettingsVisibleProperty(); });
    }
    inline auto NavigationView::IsPaneToggleButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.IsPaneToggleButtonVisibleProperty(); });
    }
    inline auto NavigationView::AlwaysShowHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.AlwaysShowHeaderProperty(); });
    }
    inline auto NavigationView::CompactPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.CompactPaneLengthProperty(); });
    }
    inline auto NavigationView::OpenPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.OpenPaneLengthProperty(); });
    }
    inline auto NavigationView::PaneToggleButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.PaneToggleButtonStyleProperty(); });
    }
    inline auto NavigationView::MenuItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemsProperty(); });
    }
    inline auto NavigationView::MenuItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemsSourceProperty(); });
    }
    inline auto NavigationView::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto NavigationView::SettingsItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.SettingsItemProperty(); });
    }
    inline auto NavigationView::AutoSuggestBoxProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.AutoSuggestBoxProperty(); });
    }
    inline auto NavigationView::MenuItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemTemplateProperty(); });
    }
    inline auto NavigationView::MenuItemTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemTemplateSelectorProperty(); });
    }
    inline auto NavigationView::MenuItemContainerStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemContainerStyleProperty(); });
    }
    inline auto NavigationView::MenuItemContainerStyleSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.MenuItemContainerStyleSelectorProperty(); });
    }
    inline auto NavigationView::IsTitleBarAutoPaddingEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics const&), NavigationView, INavigationViewStatics>([](INavigationViewStatics const& f) { return f.IsTitleBarAutoPaddingEnabledProperty(); });
    }
    inline auto NavigationView::IsBackButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.IsBackButtonVisibleProperty(); });
    }
    inline auto NavigationView::IsBackEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.IsBackEnabledProperty(); });
    }
    inline auto NavigationView::PaneTitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.PaneTitleProperty(); });
    }
    inline auto NavigationView::PaneDisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.PaneDisplayModeProperty(); });
    }
    inline auto NavigationView::PaneHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.PaneHeaderProperty(); });
    }
    inline auto NavigationView::PaneCustomContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.PaneCustomContentProperty(); });
    }
    inline auto NavigationView::ContentOverlayProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.ContentOverlayProperty(); });
    }
    inline auto NavigationView::IsPaneVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.IsPaneVisibleProperty(); });
    }
    inline auto NavigationView::SelectionFollowsFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.SelectionFollowsFocusProperty(); });
    }
    inline auto NavigationView::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.TemplateSettingsProperty(); });
    }
    inline auto NavigationView::ShoulderNavigationEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.ShoulderNavigationEnabledProperty(); });
    }
    inline auto NavigationView::OverflowLabelModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewStatics2 const&), NavigationView, INavigationViewStatics2>([](INavigationViewStatics2 const& f) { return f.OverflowLabelModeProperty(); });
    }
    inline NavigationViewItem::NavigationViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewItem, INavigationViewItemFactory>([&](INavigationViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NavigationViewItem::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics const&), NavigationViewItem, INavigationViewItemStatics>([](INavigationViewItemStatics const& f) { return f.IconProperty(); });
    }
    inline auto NavigationViewItem::CompactPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics const&), NavigationViewItem, INavigationViewItemStatics>([](INavigationViewItemStatics const& f) { return f.CompactPaneLengthProperty(); });
    }
    inline auto NavigationViewItem::SelectsOnInvokedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.SelectsOnInvokedProperty(); });
    }
    inline auto NavigationViewItem::IsExpandedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.IsExpandedProperty(); });
    }
    inline auto NavigationViewItem::HasUnrealizedChildrenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.HasUnrealizedChildrenProperty(); });
    }
    inline auto NavigationViewItem::IsChildSelectedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.IsChildSelectedProperty(); });
    }
    inline auto NavigationViewItem::MenuItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.MenuItemsProperty(); });
    }
    inline auto NavigationViewItem::MenuItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics2 const&), NavigationViewItem, INavigationViewItemStatics2>([](INavigationViewItemStatics2 const& f) { return f.MenuItemsSourceProperty(); });
    }
    inline auto NavigationViewItem::InfoBadgeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemStatics3 const&), NavigationViewItem, INavigationViewItemStatics3>([](INavigationViewItemStatics3 const& f) { return f.InfoBadgeProperty(); });
    }
    inline auto NavigationViewItemBase::IsSelectedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemBaseStatics const&), NavigationViewItemBase, INavigationViewItemBaseStatics>([](INavigationViewItemBaseStatics const& f) { return f.IsSelectedProperty(); });
    }
    inline NavigationViewItemHeader::NavigationViewItemHeader()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewItemHeader, INavigationViewItemHeaderFactory>([&](INavigationViewItemHeaderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline NavigationViewItemInvokedEventArgs::NavigationViewItemInvokedEventArgs() :
        NavigationViewItemInvokedEventArgs(impl::call_factory_cast<NavigationViewItemInvokedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), NavigationViewItemInvokedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<NavigationViewItemInvokedEventArgs>(); }))
    {
    }
    inline NavigationViewItemSeparator::NavigationViewItemSeparator()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewItemSeparator, INavigationViewItemSeparatorFactory>([&](INavigationViewItemSeparatorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline NavigationViewTemplateSettings::NavigationViewTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewTemplateSettings, INavigationViewTemplateSettingsFactory>([&](INavigationViewTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NavigationViewTemplateSettings::TopPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.TopPaddingProperty(); });
    }
    inline auto NavigationViewTemplateSettings::OverflowButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.OverflowButtonVisibilityProperty(); });
    }
    inline auto NavigationViewTemplateSettings::PaneToggleButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.PaneToggleButtonVisibilityProperty(); });
    }
    inline auto NavigationViewTemplateSettings::BackButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.BackButtonVisibilityProperty(); });
    }
    inline auto NavigationViewTemplateSettings::TopPaneVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.TopPaneVisibilityProperty(); });
    }
    inline auto NavigationViewTemplateSettings::LeftPaneVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.LeftPaneVisibilityProperty(); });
    }
    inline auto NavigationViewTemplateSettings::SingleSelectionFollowsFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.SingleSelectionFollowsFocusProperty(); });
    }
    inline auto NavigationViewTemplateSettings::PaneToggleButtonWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.PaneToggleButtonWidthProperty(); });
    }
    inline auto NavigationViewTemplateSettings::SmallerPaneToggleButtonWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics>([](INavigationViewTemplateSettingsStatics const& f) { return f.SmallerPaneToggleButtonWidthProperty(); });
    }
    inline auto NavigationViewTemplateSettings::OpenPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewTemplateSettingsStatics2 const&), NavigationViewTemplateSettings, INavigationViewTemplateSettingsStatics2>([](INavigationViewTemplateSettingsStatics2 const& f) { return f.OpenPaneLengthProperty(); });
    }
    inline NonVirtualizingLayout::NonVirtualizingLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NonVirtualizingLayout, INonVirtualizingLayoutFactory>([&](INonVirtualizingLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline NonVirtualizingLayoutContext::NonVirtualizingLayoutContext()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NonVirtualizingLayoutContext, INonVirtualizingLayoutContextFactory>([&](INonVirtualizingLayoutContextFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline NumberBox::NumberBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NumberBox, INumberBoxFactory>([&](INumberBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NumberBox::MinimumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.MinimumProperty(); });
    }
    inline auto NumberBox::MaximumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.MaximumProperty(); });
    }
    inline auto NumberBox::ValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.ValueProperty(); });
    }
    inline auto NumberBox::SmallChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.SmallChangeProperty(); });
    }
    inline auto NumberBox::LargeChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.LargeChangeProperty(); });
    }
    inline auto NumberBox::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.TextProperty(); });
    }
    inline auto NumberBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto NumberBox::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto NumberBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto NumberBox::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline auto NumberBox::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto NumberBox::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline auto NumberBox::PreventKeyboardDisplayOnProgrammaticFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.PreventKeyboardDisplayOnProgrammaticFocusProperty(); });
    }
    inline auto NumberBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline auto NumberBox::ValidationModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.ValidationModeProperty(); });
    }
    inline auto NumberBox::SpinButtonPlacementModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.SpinButtonPlacementModeProperty(); });
    }
    inline auto NumberBox::IsWrapEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.IsWrapEnabledProperty(); });
    }
    inline auto NumberBox::AcceptsExpressionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.AcceptsExpressionProperty(); });
    }
    inline auto NumberBox::NumberFormatterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INumberBoxStatics const&), NumberBox, INumberBoxStatics>([](INumberBoxStatics const& f) { return f.NumberFormatterProperty(); });
    }
    inline Page::Page()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Page, IPageFactory>([&](IPageFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Page::FrameProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPageStatics const&), Page, IPageStatics>([](IPageStatics const& f) { return f.FrameProperty(); });
    }
    inline auto Page::TopAppBarProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPageStatics const&), Page, IPageStatics>([](IPageStatics const& f) { return f.TopAppBarProperty(); });
    }
    inline auto Page::BottomAppBarProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPageStatics const&), Page, IPageStatics>([](IPageStatics const& f) { return f.BottomAppBarProperty(); });
    }
    inline auto Panel::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPanelStatics const&), Panel, IPanelStatics>([](IPanelStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto Panel::IsItemsHostProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPanelStatics const&), Panel, IPanelStatics>([](IPanelStatics const& f) { return f.IsItemsHostProperty(); });
    }
    inline auto Panel::ChildrenTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPanelStatics const&), Panel, IPanelStatics>([](IPanelStatics const& f) { return f.ChildrenTransitionsProperty(); });
    }
    inline ParallaxView::ParallaxView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ParallaxView, IParallaxViewFactory>([&](IParallaxViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ParallaxView::ChildProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.ChildProperty(); });
    }
    inline auto ParallaxView::HorizontalSourceEndOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.HorizontalSourceEndOffsetProperty(); });
    }
    inline auto ParallaxView::HorizontalSourceOffsetKindProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.HorizontalSourceOffsetKindProperty(); });
    }
    inline auto ParallaxView::HorizontalSourceStartOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.HorizontalSourceStartOffsetProperty(); });
    }
    inline auto ParallaxView::MaxHorizontalShiftRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.MaxHorizontalShiftRatioProperty(); });
    }
    inline auto ParallaxView::HorizontalShiftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.HorizontalShiftProperty(); });
    }
    inline auto ParallaxView::IsHorizontalShiftClampedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.IsHorizontalShiftClampedProperty(); });
    }
    inline auto ParallaxView::IsVerticalShiftClampedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.IsVerticalShiftClampedProperty(); });
    }
    inline auto ParallaxView::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.SourceProperty(); });
    }
    inline auto ParallaxView::VerticalSourceEndOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.VerticalSourceEndOffsetProperty(); });
    }
    inline auto ParallaxView::VerticalSourceOffsetKindProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.VerticalSourceOffsetKindProperty(); });
    }
    inline auto ParallaxView::VerticalSourceStartOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.VerticalSourceStartOffsetProperty(); });
    }
    inline auto ParallaxView::MaxVerticalShiftRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.MaxVerticalShiftRatioProperty(); });
    }
    inline auto ParallaxView::VerticalShiftProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IParallaxViewStatics const&), ParallaxView, IParallaxViewStatics>([](IParallaxViewStatics const& f) { return f.VerticalShiftProperty(); });
    }
    inline PasswordBox::PasswordBox() :
        PasswordBox(impl::call_factory_cast<PasswordBox(*)(winrt::Windows::Foundation::IActivationFactory const&), PasswordBox>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PasswordBox>(); }))
    {
    }
    inline auto PasswordBox::PasswordProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.PasswordProperty(); });
    }
    inline auto PasswordBox::PasswordCharProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.PasswordCharProperty(); });
    }
    inline auto PasswordBox::IsPasswordRevealButtonEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.IsPasswordRevealButtonEnabledProperty(); });
    }
    inline auto PasswordBox::MaxLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.MaxLengthProperty(); });
    }
    inline auto PasswordBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto PasswordBox::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto PasswordBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto PasswordBox::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto PasswordBox::PreventKeyboardDisplayOnProgrammaticFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.PreventKeyboardDisplayOnProgrammaticFocusProperty(); });
    }
    inline auto PasswordBox::PasswordRevealModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.PasswordRevealModeProperty(); });
    }
    inline auto PasswordBox::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline auto PasswordBox::InputScopeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.InputScopeProperty(); });
    }
    inline auto PasswordBox::CanPasteClipboardContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.CanPasteClipboardContentProperty(); });
    }
    inline auto PasswordBox::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline auto PasswordBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPasswordBoxStatics const&), PasswordBox, IPasswordBoxStatics>([](IPasswordBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline PathIcon::PathIcon()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PathIcon, IPathIconFactory>([&](IPathIconFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto PathIcon::DataProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPathIconStatics const&), PathIcon, IPathIconStatics>([](IPathIconStatics const& f) { return f.DataProperty(); });
    }
    inline PathIconSource::PathIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PathIconSource, IPathIconSourceFactory>([&](IPathIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto PathIconSource::DataProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPathIconSourceStatics const&), PathIconSource, IPathIconSourceStatics>([](IPathIconSourceStatics const& f) { return f.DataProperty(); });
    }
    inline PersonPicture::PersonPicture()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PersonPicture, IPersonPictureFactory>([&](IPersonPictureFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto PersonPicture::BadgeNumberProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.BadgeNumberProperty(); });
    }
    inline auto PersonPicture::BadgeGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.BadgeGlyphProperty(); });
    }
    inline auto PersonPicture::BadgeImageSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.BadgeImageSourceProperty(); });
    }
    inline auto PersonPicture::BadgeTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.BadgeTextProperty(); });
    }
    inline auto PersonPicture::IsGroupProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.IsGroupProperty(); });
    }
    inline auto PersonPicture::ContactProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.ContactProperty(); });
    }
    inline auto PersonPicture::DisplayNameProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.DisplayNameProperty(); });
    }
    inline auto PersonPicture::InitialsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.InitialsProperty(); });
    }
    inline auto PersonPicture::PreferSmallImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.PreferSmallImageProperty(); });
    }
    inline auto PersonPicture::ProfilePictureProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPersonPictureStatics const&), PersonPicture, IPersonPictureStatics>([](IPersonPictureStatics const& f) { return f.ProfilePictureProperty(); });
    }
    inline PickerConfirmedEventArgs::PickerConfirmedEventArgs() :
        PickerConfirmedEventArgs(impl::call_factory_cast<PickerConfirmedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), PickerConfirmedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PickerConfirmedEventArgs>(); }))
    {
    }
    inline PickerFlyout::PickerFlyout() :
        PickerFlyout(impl::call_factory_cast<PickerFlyout(*)(winrt::Windows::Foundation::IActivationFactory const&), PickerFlyout>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PickerFlyout>(); }))
    {
    }
    inline auto PickerFlyout::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPickerFlyoutStatics const&), PickerFlyout, IPickerFlyoutStatics>([](IPickerFlyoutStatics const& f) { return f.ContentProperty(); });
    }
    inline auto PickerFlyout::ConfirmationButtonsVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPickerFlyoutStatics const&), PickerFlyout, IPickerFlyoutStatics>([](IPickerFlyoutStatics const& f) { return f.ConfirmationButtonsVisibleProperty(); });
    }
    inline PipsPager::PipsPager()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PipsPager, IPipsPagerFactory>([&](IPipsPagerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto PipsPager::NumberOfPagesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.NumberOfPagesProperty(); });
    }
    inline auto PipsPager::SelectedPageIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.SelectedPageIndexProperty(); });
    }
    inline auto PipsPager::MaxVisiblePipsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.MaxVisiblePipsProperty(); });
    }
    inline auto PipsPager::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto PipsPager::PreviousButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.PreviousButtonVisibilityProperty(); });
    }
    inline auto PipsPager::NextButtonVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.NextButtonVisibilityProperty(); });
    }
    inline auto PipsPager::PreviousButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.PreviousButtonStyleProperty(); });
    }
    inline auto PipsPager::NextButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.NextButtonStyleProperty(); });
    }
    inline auto PipsPager::SelectedPipStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.SelectedPipStyleProperty(); });
    }
    inline auto PipsPager::NormalPipStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics const&), PipsPager, IPipsPagerStatics>([](IPipsPagerStatics const& f) { return f.NormalPipStyleProperty(); });
    }
    inline auto PipsPager::WrapModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPipsPagerStatics2 const&), PipsPager, IPipsPagerStatics2>([](IPipsPagerStatics2 const& f) { return f.WrapModeProperty(); });
    }
    inline Pivot::Pivot()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Pivot, IPivotFactory>([&](IPivotFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Pivot::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.TitleProperty(); });
    }
    inline auto Pivot::TitleTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.TitleTemplateProperty(); });
    }
    inline auto Pivot::LeftHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.LeftHeaderProperty(); });
    }
    inline auto Pivot::LeftHeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.LeftHeaderTemplateProperty(); });
    }
    inline auto Pivot::RightHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.RightHeaderProperty(); });
    }
    inline auto Pivot::RightHeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.RightHeaderTemplateProperty(); });
    }
    inline auto Pivot::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto Pivot::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto Pivot::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto Pivot::IsLockedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.IsLockedProperty(); });
    }
    inline auto Pivot::HeaderFocusVisualPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.HeaderFocusVisualPlacementProperty(); });
    }
    inline auto Pivot::IsHeaderItemsCarouselEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.IsHeaderItemsCarouselEnabledProperty(); });
    }
    inline auto Pivot::SlideInAnimationGroupProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotStatics const&), Pivot, IPivotStatics>([](IPivotStatics const& f) { return f.SlideInAnimationGroupProperty(); });
    }
    inline auto Pivot::GetSlideInAnimationGroup(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<Pivot, IPivotStatics>([&](IPivotStatics const& f) { return f.GetSlideInAnimationGroup(element); });
    }
    inline auto Pivot::SetSlideInAnimationGroup(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, winrt::Microsoft::UI::Xaml::Controls::PivotSlideInAnimationGroup const& value)
    {
        impl::call_factory<Pivot, IPivotStatics>([&](IPivotStatics const& f) { return f.SetSlideInAnimationGroup(element, value); });
    }
    inline PivotItem::PivotItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PivotItem, IPivotItemFactory>([&](IPivotItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto PivotItem::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPivotItemStatics const&), PivotItem, IPivotItemStatics>([](IPivotItemStatics const& f) { return f.HeaderProperty(); });
    }
    inline PivotItemEventArgs::PivotItemEventArgs() :
        PivotItemEventArgs(impl::call_factory_cast<PivotItemEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), PivotItemEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PivotItemEventArgs>(); }))
    {
    }
    inline ProgressBar::ProgressBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ProgressBar, IProgressBarFactory>([&](IProgressBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ProgressBar::IsIndeterminateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressBarStatics const&), ProgressBar, IProgressBarStatics>([](IProgressBarStatics const& f) { return f.IsIndeterminateProperty(); });
    }
    inline auto ProgressBar::ShowErrorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressBarStatics const&), ProgressBar, IProgressBarStatics>([](IProgressBarStatics const& f) { return f.ShowErrorProperty(); });
    }
    inline auto ProgressBar::ShowPausedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressBarStatics const&), ProgressBar, IProgressBarStatics>([](IProgressBarStatics const& f) { return f.ShowPausedProperty(); });
    }
    inline ProgressRing::ProgressRing()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ProgressRing, IProgressRingFactory>([&](IProgressRingFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ProgressRing::IsActiveProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressRingStatics const&), ProgressRing, IProgressRingStatics>([](IProgressRingStatics const& f) { return f.IsActiveProperty(); });
    }
    inline auto ProgressRing::IsIndeterminateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressRingStatics const&), ProgressRing, IProgressRingStatics>([](IProgressRingStatics const& f) { return f.IsIndeterminateProperty(); });
    }
    inline auto ProgressRing::ValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressRingStatics const&), ProgressRing, IProgressRingStatics>([](IProgressRingStatics const& f) { return f.ValueProperty(); });
    }
    inline auto ProgressRing::MinimumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressRingStatics const&), ProgressRing, IProgressRingStatics>([](IProgressRingStatics const& f) { return f.MinimumProperty(); });
    }
    inline auto ProgressRing::MaximumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IProgressRingStatics const&), ProgressRing, IProgressRingStatics>([](IProgressRingStatics const& f) { return f.MaximumProperty(); });
    }
    inline RadioButton::RadioButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RadioButton, IRadioButtonFactory>([&](IRadioButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RadioButton::GroupNameProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonStatics const&), RadioButton, IRadioButtonStatics>([](IRadioButtonStatics const& f) { return f.GroupNameProperty(); });
    }
    inline RadioButtons::RadioButtons()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RadioButtons, IRadioButtonsFactory>([&](IRadioButtonsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RadioButtons::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.ItemsSourceProperty(); });
    }
    inline auto RadioButtons::ItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.ItemsProperty(); });
    }
    inline auto RadioButtons::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto RadioButtons::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto RadioButtons::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto RadioButtons::MaxColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.MaxColumnsProperty(); });
    }
    inline auto RadioButtons::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto RadioButtons::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioButtonsStatics const&), RadioButtons, IRadioButtonsStatics>([](IRadioButtonsStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline RadioMenuFlyoutItem::RadioMenuFlyoutItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RadioMenuFlyoutItem, IRadioMenuFlyoutItemFactory>([&](IRadioMenuFlyoutItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RadioMenuFlyoutItem::IsCheckedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioMenuFlyoutItemStatics const&), RadioMenuFlyoutItem, IRadioMenuFlyoutItemStatics>([](IRadioMenuFlyoutItemStatics const& f) { return f.IsCheckedProperty(); });
    }
    inline auto RadioMenuFlyoutItem::GroupNameProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioMenuFlyoutItemStatics const&), RadioMenuFlyoutItem, IRadioMenuFlyoutItemStatics>([](IRadioMenuFlyoutItemStatics const& f) { return f.GroupNameProperty(); });
    }
    inline auto RadioMenuFlyoutItem::AreCheckStatesEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRadioMenuFlyoutItemStatics2 const&), RadioMenuFlyoutItem, IRadioMenuFlyoutItemStatics2>([](IRadioMenuFlyoutItemStatics2 const& f) { return f.AreCheckStatesEnabledProperty(); });
    }
    inline auto RadioMenuFlyoutItem::SetAreCheckStatesEnabled(winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const& object, bool value)
    {
        impl::call_factory<RadioMenuFlyoutItem, IRadioMenuFlyoutItemStatics2>([&](IRadioMenuFlyoutItemStatics2 const& f) { return f.SetAreCheckStatesEnabled(object, value); });
    }
    inline auto RadioMenuFlyoutItem::GetAreCheckStatesEnabled(winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem const& object)
    {
        return impl::call_factory<RadioMenuFlyoutItem, IRadioMenuFlyoutItemStatics2>([&](IRadioMenuFlyoutItemStatics2 const& f) { return f.GetAreCheckStatesEnabled(object); });
    }
    inline RatingControl::RatingControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RatingControl, IRatingControlFactory>([&](IRatingControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RatingControl::CaptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.CaptionProperty(); });
    }
    inline auto RatingControl::InitialSetValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.InitialSetValueProperty(); });
    }
    inline auto RatingControl::IsClearEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.IsClearEnabledProperty(); });
    }
    inline auto RatingControl::IsReadOnlyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.IsReadOnlyProperty(); });
    }
    inline auto RatingControl::MaxRatingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.MaxRatingProperty(); });
    }
    inline auto RatingControl::PlaceholderValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.PlaceholderValueProperty(); });
    }
    inline auto RatingControl::ItemInfoProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.ItemInfoProperty(); });
    }
    inline auto RatingControl::ValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingControlStatics const&), RatingControl, IRatingControlStatics>([](IRatingControlStatics const& f) { return f.ValueProperty(); });
    }
    inline RatingItemFontInfo::RatingItemFontInfo()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RatingItemFontInfo, IRatingItemFontInfoFactory>([&](IRatingItemFontInfoFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RatingItemFontInfo::DisabledGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.DisabledGlyphProperty(); });
    }
    inline auto RatingItemFontInfo::GlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.GlyphProperty(); });
    }
    inline auto RatingItemFontInfo::PlaceholderGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.PlaceholderGlyphProperty(); });
    }
    inline auto RatingItemFontInfo::PointerOverGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.PointerOverGlyphProperty(); });
    }
    inline auto RatingItemFontInfo::PointerOverPlaceholderGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.PointerOverPlaceholderGlyphProperty(); });
    }
    inline auto RatingItemFontInfo::UnsetGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemFontInfoStatics const&), RatingItemFontInfo, IRatingItemFontInfoStatics>([](IRatingItemFontInfoStatics const& f) { return f.UnsetGlyphProperty(); });
    }
    inline RatingItemImageInfo::RatingItemImageInfo()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RatingItemImageInfo, IRatingItemImageInfoFactory>([&](IRatingItemImageInfoFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RatingItemImageInfo::DisabledImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.DisabledImageProperty(); });
    }
    inline auto RatingItemImageInfo::ImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.ImageProperty(); });
    }
    inline auto RatingItemImageInfo::PlaceholderImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.PlaceholderImageProperty(); });
    }
    inline auto RatingItemImageInfo::PointerOverImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.PointerOverImageProperty(); });
    }
    inline auto RatingItemImageInfo::PointerOverPlaceholderImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.PointerOverPlaceholderImageProperty(); });
    }
    inline auto RatingItemImageInfo::UnsetImageProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRatingItemImageInfoStatics const&), RatingItemImageInfo, IRatingItemImageInfoStatics>([](IRatingItemImageInfoStatics const& f) { return f.UnsetImageProperty(); });
    }
    inline RatingItemInfo::RatingItemInfo()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RatingItemInfo, IRatingItemInfoFactory>([&](IRatingItemInfoFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline RefreshContainer::RefreshContainer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RefreshContainer, IRefreshContainerFactory>([&](IRefreshContainerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RefreshContainer::VisualizerProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshContainerStatics const&), RefreshContainer, IRefreshContainerStatics>([](IRefreshContainerStatics const& f) { return f.VisualizerProperty(); });
    }
    inline auto RefreshContainer::PullDirectionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshContainerStatics const&), RefreshContainer, IRefreshContainerStatics>([](IRefreshContainerStatics const& f) { return f.PullDirectionProperty(); });
    }
    inline RefreshVisualizer::RefreshVisualizer()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RefreshVisualizer, IRefreshVisualizerFactory>([&](IRefreshVisualizerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RefreshVisualizer::InfoProviderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshVisualizerStatics const&), RefreshVisualizer, IRefreshVisualizerStatics>([](IRefreshVisualizerStatics const& f) { return f.InfoProviderProperty(); });
    }
    inline auto RefreshVisualizer::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshVisualizerStatics const&), RefreshVisualizer, IRefreshVisualizerStatics>([](IRefreshVisualizerStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto RefreshVisualizer::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshVisualizerStatics const&), RefreshVisualizer, IRefreshVisualizerStatics>([](IRefreshVisualizerStatics const& f) { return f.ContentProperty(); });
    }
    inline auto RefreshVisualizer::StateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRefreshVisualizerStatics const&), RefreshVisualizer, IRefreshVisualizerStatics>([](IRefreshVisualizerStatics const& f) { return f.StateProperty(); });
    }
    inline RelativePanel::RelativePanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RelativePanel, IRelativePanelFactory>([&](IRelativePanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RelativePanel::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto RelativePanel::LeftOfProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.LeftOfProperty(); });
    }
    inline auto RelativePanel::GetLeftOf(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetLeftOf(element); });
    }
    inline auto RelativePanel::SetLeftOf(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetLeftOf(element, value); });
    }
    inline auto RelativePanel::AboveProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AboveProperty(); });
    }
    inline auto RelativePanel::GetAbove(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAbove(element); });
    }
    inline auto RelativePanel::SetAbove(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAbove(element, value); });
    }
    inline auto RelativePanel::RightOfProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.RightOfProperty(); });
    }
    inline auto RelativePanel::GetRightOf(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetRightOf(element); });
    }
    inline auto RelativePanel::SetRightOf(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetRightOf(element, value); });
    }
    inline auto RelativePanel::BelowProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.BelowProperty(); });
    }
    inline auto RelativePanel::GetBelow(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetBelow(element); });
    }
    inline auto RelativePanel::SetBelow(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetBelow(element, value); });
    }
    inline auto RelativePanel::AlignHorizontalCenterWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignHorizontalCenterWithProperty(); });
    }
    inline auto RelativePanel::GetAlignHorizontalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignHorizontalCenterWith(element); });
    }
    inline auto RelativePanel::SetAlignHorizontalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignHorizontalCenterWith(element, value); });
    }
    inline auto RelativePanel::AlignVerticalCenterWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignVerticalCenterWithProperty(); });
    }
    inline auto RelativePanel::GetAlignVerticalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignVerticalCenterWith(element); });
    }
    inline auto RelativePanel::SetAlignVerticalCenterWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignVerticalCenterWith(element, value); });
    }
    inline auto RelativePanel::AlignLeftWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignLeftWithProperty(); });
    }
    inline auto RelativePanel::GetAlignLeftWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignLeftWith(element); });
    }
    inline auto RelativePanel::SetAlignLeftWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignLeftWith(element, value); });
    }
    inline auto RelativePanel::AlignTopWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignTopWithProperty(); });
    }
    inline auto RelativePanel::GetAlignTopWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignTopWith(element); });
    }
    inline auto RelativePanel::SetAlignTopWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignTopWith(element, value); });
    }
    inline auto RelativePanel::AlignRightWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignRightWithProperty(); });
    }
    inline auto RelativePanel::GetAlignRightWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignRightWith(element); });
    }
    inline auto RelativePanel::SetAlignRightWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignRightWith(element, value); });
    }
    inline auto RelativePanel::AlignBottomWithProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignBottomWithProperty(); });
    }
    inline auto RelativePanel::GetAlignBottomWith(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignBottomWith(element); });
    }
    inline auto RelativePanel::SetAlignBottomWith(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignBottomWith(element, value); });
    }
    inline auto RelativePanel::AlignLeftWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignLeftWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignLeftWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignLeftWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignLeftWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignLeftWithPanel(element, value); });
    }
    inline auto RelativePanel::AlignTopWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignTopWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignTopWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignTopWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignTopWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignTopWithPanel(element, value); });
    }
    inline auto RelativePanel::AlignRightWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignRightWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignRightWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignRightWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignRightWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignRightWithPanel(element, value); });
    }
    inline auto RelativePanel::AlignBottomWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignBottomWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignBottomWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignBottomWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignBottomWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignBottomWithPanel(element, value); });
    }
    inline auto RelativePanel::AlignHorizontalCenterWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignHorizontalCenterWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignHorizontalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignHorizontalCenterWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignHorizontalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignHorizontalCenterWithPanel(element, value); });
    }
    inline auto RelativePanel::AlignVerticalCenterWithPanelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.AlignVerticalCenterWithPanelProperty(); });
    }
    inline auto RelativePanel::GetAlignVerticalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.GetAlignVerticalCenterWithPanel(element); });
    }
    inline auto RelativePanel::SetAlignVerticalCenterWithPanel(winrt::Microsoft::UI::Xaml::UIElement const& element, bool value)
    {
        impl::call_factory<RelativePanel, IRelativePanelStatics>([&](IRelativePanelStatics const& f) { return f.SetAlignVerticalCenterWithPanel(element, value); });
    }
    inline auto RelativePanel::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto RelativePanel::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto RelativePanel::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto RelativePanel::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRelativePanelStatics const&), RelativePanel, IRelativePanelStatics>([](IRelativePanelStatics const& f) { return f.PaddingProperty(); });
    }
    inline RevealListViewItemPresenter::RevealListViewItemPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RevealListViewItemPresenter, IRevealListViewItemPresenterFactory>([&](IRevealListViewItemPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline RichEditBox::RichEditBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RichEditBox, IRichEditBoxFactory>([&](IRichEditBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto RichEditBox::IsReadOnlyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.IsReadOnlyProperty(); });
    }
    inline auto RichEditBox::AcceptsReturnProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.AcceptsReturnProperty(); });
    }
    inline auto RichEditBox::TextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.TextAlignmentProperty(); });
    }
    inline auto RichEditBox::TextWrappingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.TextWrappingProperty(); });
    }
    inline auto RichEditBox::IsSpellCheckEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.IsSpellCheckEnabledProperty(); });
    }
    inline auto RichEditBox::IsTextPredictionEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.IsTextPredictionEnabledProperty(); });
    }
    inline auto RichEditBox::InputScopeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.InputScopeProperty(); });
    }
    inline auto RichEditBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto RichEditBox::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto RichEditBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto RichEditBox::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto RichEditBox::PreventKeyboardDisplayOnProgrammaticFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.PreventKeyboardDisplayOnProgrammaticFocusProperty(); });
    }
    inline auto RichEditBox::IsColorFontEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.IsColorFontEnabledProperty(); });
    }
    inline auto RichEditBox::SelectionHighlightColorWhenNotFocusedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.SelectionHighlightColorWhenNotFocusedProperty(); });
    }
    inline auto RichEditBox::MaxLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.MaxLengthProperty(); });
    }
    inline auto RichEditBox::HorizontalTextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.HorizontalTextAlignmentProperty(); });
    }
    inline auto RichEditBox::CharacterCasingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.CharacterCasingProperty(); });
    }
    inline auto RichEditBox::DisabledFormattingAcceleratorsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.DisabledFormattingAcceleratorsProperty(); });
    }
    inline auto RichEditBox::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline auto RichEditBox::ProofingMenuFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.ProofingMenuFlyoutProperty(); });
    }
    inline auto RichEditBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline auto RichEditBox::DesiredCandidateWindowAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.DesiredCandidateWindowAlignmentProperty(); });
    }
    inline auto RichEditBox::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline auto RichEditBox::ClipboardCopyFormatProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichEditBoxStatics const&), RichEditBox, IRichEditBoxStatics>([](IRichEditBoxStatics const& f) { return f.ClipboardCopyFormatProperty(); });
    }
    inline RichTextBlock::RichTextBlock() :
        RichTextBlock(impl::call_factory_cast<RichTextBlock(*)(winrt::Windows::Foundation::IActivationFactory const&), RichTextBlock>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<RichTextBlock>(); }))
    {
    }
    inline auto RichTextBlock::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto RichTextBlock::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto RichTextBlock::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto RichTextBlock::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto RichTextBlock::FontStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.FontStretchProperty(); });
    }
    inline auto RichTextBlock::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto RichTextBlock::TextWrappingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextWrappingProperty(); });
    }
    inline auto RichTextBlock::TextTrimmingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextTrimmingProperty(); });
    }
    inline auto RichTextBlock::TextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextAlignmentProperty(); });
    }
    inline auto RichTextBlock::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto RichTextBlock::LineHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.LineHeightProperty(); });
    }
    inline auto RichTextBlock::LineStackingStrategyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.LineStackingStrategyProperty(); });
    }
    inline auto RichTextBlock::CharacterSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.CharacterSpacingProperty(); });
    }
    inline auto RichTextBlock::OverflowContentTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.OverflowContentTargetProperty(); });
    }
    inline auto RichTextBlock::IsTextSelectionEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.IsTextSelectionEnabledProperty(); });
    }
    inline auto RichTextBlock::HasOverflowContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.HasOverflowContentProperty(); });
    }
    inline auto RichTextBlock::SelectedTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.SelectedTextProperty(); });
    }
    inline auto RichTextBlock::MaxLinesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.MaxLinesProperty(); });
    }
    inline auto RichTextBlock::TextLineBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextLineBoundsProperty(); });
    }
    inline auto RichTextBlock::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto RichTextBlock::OpticalMarginAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.OpticalMarginAlignmentProperty(); });
    }
    inline auto RichTextBlock::IsColorFontEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.IsColorFontEnabledProperty(); });
    }
    inline auto RichTextBlock::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline auto RichTextBlock::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto RichTextBlock::TextDecorationsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextDecorationsProperty(); });
    }
    inline auto RichTextBlock::IsTextTrimmedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.IsTextTrimmedProperty(); });
    }
    inline auto RichTextBlock::HorizontalTextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.HorizontalTextAlignmentProperty(); });
    }
    inline auto RichTextBlock::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline auto RichTextBlock::TextIndentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockStatics const&), RichTextBlock, IRichTextBlockStatics>([](IRichTextBlockStatics const& f) { return f.TextIndentProperty(); });
    }
    inline RichTextBlockOverflow::RichTextBlockOverflow() :
        RichTextBlockOverflow(impl::call_factory_cast<RichTextBlockOverflow(*)(winrt::Windows::Foundation::IActivationFactory const&), RichTextBlockOverflow>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<RichTextBlockOverflow>(); }))
    {
    }
    inline auto RichTextBlockOverflow::OverflowContentTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockOverflowStatics const&), RichTextBlockOverflow, IRichTextBlockOverflowStatics>([](IRichTextBlockOverflowStatics const& f) { return f.OverflowContentTargetProperty(); });
    }
    inline auto RichTextBlockOverflow::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockOverflowStatics const&), RichTextBlockOverflow, IRichTextBlockOverflowStatics>([](IRichTextBlockOverflowStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto RichTextBlockOverflow::HasOverflowContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockOverflowStatics const&), RichTextBlockOverflow, IRichTextBlockOverflowStatics>([](IRichTextBlockOverflowStatics const& f) { return f.HasOverflowContentProperty(); });
    }
    inline auto RichTextBlockOverflow::MaxLinesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockOverflowStatics const&), RichTextBlockOverflow, IRichTextBlockOverflowStatics>([](IRichTextBlockOverflowStatics const& f) { return f.MaxLinesProperty(); });
    }
    inline auto RichTextBlockOverflow::IsTextTrimmedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRichTextBlockOverflowStatics const&), RichTextBlockOverflow, IRichTextBlockOverflowStatics>([](IRichTextBlockOverflowStatics const& f) { return f.IsTextTrimmedProperty(); });
    }
    inline RowDefinition::RowDefinition() :
        RowDefinition(impl::call_factory_cast<RowDefinition(*)(winrt::Windows::Foundation::IActivationFactory const&), RowDefinition>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<RowDefinition>(); }))
    {
    }
    inline auto RowDefinition::HeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRowDefinitionStatics const&), RowDefinition, IRowDefinitionStatics>([](IRowDefinitionStatics const& f) { return f.HeightProperty(); });
    }
    inline auto RowDefinition::MaxHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRowDefinitionStatics const&), RowDefinition, IRowDefinitionStatics>([](IRowDefinitionStatics const& f) { return f.MaxHeightProperty(); });
    }
    inline auto RowDefinition::MinHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRowDefinitionStatics const&), RowDefinition, IRowDefinitionStatics>([](IRowDefinitionStatics const& f) { return f.MinHeightProperty(); });
    }
    inline ScrollContentPresenter::ScrollContentPresenter() :
        ScrollContentPresenter(impl::call_factory_cast<ScrollContentPresenter(*)(winrt::Windows::Foundation::IActivationFactory const&), ScrollContentPresenter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ScrollContentPresenter>(); }))
    {
    }
    inline auto ScrollContentPresenter::CanContentRenderOutsideBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollContentPresenterStatics const&), ScrollContentPresenter, IScrollContentPresenterStatics>([](IScrollContentPresenterStatics const& f) { return f.CanContentRenderOutsideBoundsProperty(); });
    }
    inline auto ScrollContentPresenter::SizesContentToTemplatedParentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollContentPresenterStatics const&), ScrollContentPresenter, IScrollContentPresenterStatics>([](IScrollContentPresenterStatics const& f) { return f.SizesContentToTemplatedParentProperty(); });
    }
    inline ScrollView::ScrollView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollView, IScrollViewFactory>([&](IScrollViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ScrollView::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ContentProperty(); });
    }
    inline auto ScrollView::ScrollPresenterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ScrollPresenterProperty(); });
    }
    inline auto ScrollView::HorizontalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.HorizontalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollView::VerticalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.VerticalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollView::ContentOrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ContentOrientationProperty(); });
    }
    inline auto ScrollView::HorizontalScrollChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.HorizontalScrollChainModeProperty(); });
    }
    inline auto ScrollView::VerticalScrollChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.VerticalScrollChainModeProperty(); });
    }
    inline auto ScrollView::HorizontalScrollRailModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.HorizontalScrollRailModeProperty(); });
    }
    inline auto ScrollView::VerticalScrollRailModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.VerticalScrollRailModeProperty(); });
    }
    inline auto ScrollView::HorizontalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.HorizontalScrollModeProperty(); });
    }
    inline auto ScrollView::VerticalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.VerticalScrollModeProperty(); });
    }
    inline auto ScrollView::ComputedHorizontalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ComputedHorizontalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollView::ComputedVerticalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ComputedVerticalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollView::ComputedHorizontalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ComputedHorizontalScrollModeProperty(); });
    }
    inline auto ScrollView::ComputedVerticalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ComputedVerticalScrollModeProperty(); });
    }
    inline auto ScrollView::ZoomChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ZoomChainModeProperty(); });
    }
    inline auto ScrollView::ZoomModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.ZoomModeProperty(); });
    }
    inline auto ScrollView::IgnoredInputKindsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.IgnoredInputKindsProperty(); });
    }
    inline auto ScrollView::MinZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.MinZoomFactorProperty(); });
    }
    inline auto ScrollView::MaxZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.MaxZoomFactorProperty(); });
    }
    inline auto ScrollView::HorizontalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.HorizontalAnchorRatioProperty(); });
    }
    inline auto ScrollView::VerticalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewStatics const&), ScrollView, IScrollViewStatics>([](IScrollViewStatics const& f) { return f.VerticalAnchorRatioProperty(); });
    }
    inline ScrollViewer::ScrollViewer() :
        ScrollViewer(impl::call_factory_cast<ScrollViewer(*)(winrt::Windows::Foundation::IActivationFactory const&), ScrollViewer>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ScrollViewer>(); }))
    {
    }
    inline auto ScrollViewer::HorizontalSnapPointsAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalSnapPointsAlignmentProperty(); });
    }
    inline auto ScrollViewer::VerticalSnapPointsAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalSnapPointsAlignmentProperty(); });
    }
    inline auto ScrollViewer::HorizontalSnapPointsTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalSnapPointsTypeProperty(); });
    }
    inline auto ScrollViewer::VerticalSnapPointsTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalSnapPointsTypeProperty(); });
    }
    inline auto ScrollViewer::ZoomSnapPointsTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ZoomSnapPointsTypeProperty(); });
    }
    inline auto ScrollViewer::HorizontalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalOffsetProperty(); });
    }
    inline auto ScrollViewer::ViewportWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ViewportWidthProperty(); });
    }
    inline auto ScrollViewer::ScrollableWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ScrollableWidthProperty(); });
    }
    inline auto ScrollViewer::ComputedHorizontalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ComputedHorizontalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollViewer::ExtentWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ExtentWidthProperty(); });
    }
    inline auto ScrollViewer::VerticalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalOffsetProperty(); });
    }
    inline auto ScrollViewer::ViewportHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ViewportHeightProperty(); });
    }
    inline auto ScrollViewer::ScrollableHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ScrollableHeightProperty(); });
    }
    inline auto ScrollViewer::ComputedVerticalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ComputedVerticalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollViewer::ExtentHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ExtentHeightProperty(); });
    }
    inline auto ScrollViewer::MinZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.MinZoomFactorProperty(); });
    }
    inline auto ScrollViewer::MaxZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.MaxZoomFactorProperty(); });
    }
    inline auto ScrollViewer::ZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ZoomFactorProperty(); });
    }
    inline auto ScrollViewer::ZoomSnapPointsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ZoomSnapPointsProperty(); });
    }
    inline auto ScrollViewer::TopLeftHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.TopLeftHeaderProperty(); });
    }
    inline auto ScrollViewer::LeftHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.LeftHeaderProperty(); });
    }
    inline auto ScrollViewer::TopHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.TopHeaderProperty(); });
    }
    inline auto ScrollViewer::ReduceViewportForCoreInputViewOcclusionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ReduceViewportForCoreInputViewOcclusionsProperty(); });
    }
    inline auto ScrollViewer::HorizontalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalAnchorRatioProperty(); });
    }
    inline auto ScrollViewer::VerticalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalAnchorRatioProperty(); });
    }
    inline auto ScrollViewer::HorizontalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollViewer::GetHorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetHorizontalScrollBarVisibility(element); });
    }
    inline auto ScrollViewer::SetHorizontalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& horizontalScrollBarVisibility)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetHorizontalScrollBarVisibility(element, horizontalScrollBarVisibility); });
    }
    inline auto ScrollViewer::VerticalScrollBarVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalScrollBarVisibilityProperty(); });
    }
    inline auto ScrollViewer::GetVerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetVerticalScrollBarVisibility(element); });
    }
    inline auto ScrollViewer::SetVerticalScrollBarVisibility(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility const& verticalScrollBarVisibility)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetVerticalScrollBarVisibility(element, verticalScrollBarVisibility); });
    }
    inline auto ScrollViewer::IsHorizontalRailEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsHorizontalRailEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsHorizontalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsHorizontalRailEnabled(element); });
    }
    inline auto ScrollViewer::SetIsHorizontalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isHorizontalRailEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsHorizontalRailEnabled(element, isHorizontalRailEnabled); });
    }
    inline auto ScrollViewer::IsVerticalRailEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsVerticalRailEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsVerticalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsVerticalRailEnabled(element); });
    }
    inline auto ScrollViewer::SetIsVerticalRailEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isVerticalRailEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsVerticalRailEnabled(element, isVerticalRailEnabled); });
    }
    inline auto ScrollViewer::IsHorizontalScrollChainingEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsHorizontalScrollChainingEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsHorizontalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsHorizontalScrollChainingEnabled(element); });
    }
    inline auto ScrollViewer::SetIsHorizontalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isHorizontalScrollChainingEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsHorizontalScrollChainingEnabled(element, isHorizontalScrollChainingEnabled); });
    }
    inline auto ScrollViewer::IsVerticalScrollChainingEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsVerticalScrollChainingEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsVerticalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsVerticalScrollChainingEnabled(element); });
    }
    inline auto ScrollViewer::SetIsVerticalScrollChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isVerticalScrollChainingEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsVerticalScrollChainingEnabled(element, isVerticalScrollChainingEnabled); });
    }
    inline auto ScrollViewer::IsZoomChainingEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsZoomChainingEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsZoomChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsZoomChainingEnabled(element); });
    }
    inline auto ScrollViewer::SetIsZoomChainingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isZoomChainingEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsZoomChainingEnabled(element, isZoomChainingEnabled); });
    }
    inline auto ScrollViewer::IsScrollInertiaEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsScrollInertiaEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsScrollInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsScrollInertiaEnabled(element); });
    }
    inline auto ScrollViewer::SetIsScrollInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isScrollInertiaEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsScrollInertiaEnabled(element, isScrollInertiaEnabled); });
    }
    inline auto ScrollViewer::IsZoomInertiaEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsZoomInertiaEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsZoomInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsZoomInertiaEnabled(element); });
    }
    inline auto ScrollViewer::SetIsZoomInertiaEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isZoomInertiaEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsZoomInertiaEnabled(element, isZoomInertiaEnabled); });
    }
    inline auto ScrollViewer::HorizontalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.HorizontalScrollModeProperty(); });
    }
    inline auto ScrollViewer::GetHorizontalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetHorizontalScrollMode(element); });
    }
    inline auto ScrollViewer::SetHorizontalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& horizontalScrollMode)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetHorizontalScrollMode(element, horizontalScrollMode); });
    }
    inline auto ScrollViewer::VerticalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.VerticalScrollModeProperty(); });
    }
    inline auto ScrollViewer::GetVerticalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetVerticalScrollMode(element); });
    }
    inline auto ScrollViewer::SetVerticalScrollMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ScrollMode const& verticalScrollMode)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetVerticalScrollMode(element, verticalScrollMode); });
    }
    inline auto ScrollViewer::ZoomModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.ZoomModeProperty(); });
    }
    inline auto ScrollViewer::GetZoomMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetZoomMode(element); });
    }
    inline auto ScrollViewer::SetZoomMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::ZoomMode const& zoomMode)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetZoomMode(element, zoomMode); });
    }
    inline auto ScrollViewer::CanContentRenderOutsideBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.CanContentRenderOutsideBoundsProperty(); });
    }
    inline auto ScrollViewer::GetCanContentRenderOutsideBounds(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetCanContentRenderOutsideBounds(element); });
    }
    inline auto ScrollViewer::SetCanContentRenderOutsideBounds(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool canContentRenderOutsideBounds)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetCanContentRenderOutsideBounds(element, canContentRenderOutsideBounds); });
    }
    inline auto ScrollViewer::IsDeferredScrollingEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.IsDeferredScrollingEnabledProperty(); });
    }
    inline auto ScrollViewer::GetIsDeferredScrollingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetIsDeferredScrollingEnabled(element); });
    }
    inline auto ScrollViewer::SetIsDeferredScrollingEnabled(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool isDeferredScrollingEnabled)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetIsDeferredScrollingEnabled(element, isDeferredScrollingEnabled); });
    }
    inline auto ScrollViewer::BringIntoViewOnFocusChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollViewerStatics const&), ScrollViewer, IScrollViewerStatics>([](IScrollViewerStatics const& f) { return f.BringIntoViewOnFocusChangeProperty(); });
    }
    inline auto ScrollViewer::GetBringIntoViewOnFocusChange(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.GetBringIntoViewOnFocusChange(element); });
    }
    inline auto ScrollViewer::SetBringIntoViewOnFocusChange(winrt::Microsoft::UI::Xaml::DependencyObject const& element, bool bringIntoViewOnFocusChange)
    {
        impl::call_factory<ScrollViewer, IScrollViewerStatics>([&](IScrollViewerStatics const& f) { return f.SetBringIntoViewOnFocusChange(element, bringIntoViewOnFocusChange); });
    }
    inline ScrollViewerViewChangedEventArgs::ScrollViewerViewChangedEventArgs() :
        ScrollViewerViewChangedEventArgs(impl::call_factory_cast<ScrollViewerViewChangedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ScrollViewerViewChangedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ScrollViewerViewChangedEventArgs>(); }))
    {
    }
    inline ScrollingScrollOptions::ScrollingScrollOptions(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollingScrollOptions, IScrollingScrollOptionsFactory>([&](IScrollingScrollOptionsFactory const& f) { return f.CreateInstance(animationMode, baseInterface, innerInterface); });
    }
    inline ScrollingScrollOptions::ScrollingScrollOptions(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollingScrollOptions, IScrollingScrollOptionsFactory>([&](IScrollingScrollOptionsFactory const& f) { return f.CreateInstance2(animationMode, snapPointsMode, baseInterface, innerInterface); });
    }
    inline ScrollingZoomOptions::ScrollingZoomOptions(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollingZoomOptions, IScrollingZoomOptionsFactory>([&](IScrollingZoomOptionsFactory const& f) { return f.CreateInstance(animationMode, baseInterface, innerInterface); });
    }
    inline ScrollingZoomOptions::ScrollingZoomOptions(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollingZoomOptions, IScrollingZoomOptionsFactory>([&](IScrollingZoomOptionsFactory const& f) { return f.CreateInstance2(animationMode, snapPointsMode, baseInterface, innerInterface); });
    }
    inline SelectionChangedEventArgs::SelectionChangedEventArgs(param::vector<winrt::Windows::Foundation::IInspectable> const& removedItems, param::vector<winrt::Windows::Foundation::IInspectable> const& addedItems)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SelectionChangedEventArgs, ISelectionChangedEventArgsFactory>([&](ISelectionChangedEventArgsFactory const& f) { return f.CreateInstanceWithRemovedItemsAndAddedItems(removedItems, addedItems, baseInterface, innerInterface); });
    }
    inline SelectorBar::SelectorBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SelectorBar, ISelectorBarFactory>([&](ISelectorBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SelectorBar::ItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorBarStatics const&), SelectorBar, ISelectorBarStatics>([](ISelectorBarStatics const& f) { return f.ItemsProperty(); });
    }
    inline auto SelectorBar::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorBarStatics const&), SelectorBar, ISelectorBarStatics>([](ISelectorBarStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline SelectorBarItem::SelectorBarItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SelectorBarItem, ISelectorBarItemFactory>([&](ISelectorBarItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SelectorBarItem::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorBarItemStatics const&), SelectorBarItem, ISelectorBarItemStatics>([](ISelectorBarItemStatics const& f) { return f.TextProperty(); });
    }
    inline auto SelectorBarItem::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorBarItemStatics const&), SelectorBarItem, ISelectorBarItemStatics>([](ISelectorBarItemStatics const& f) { return f.IconProperty(); });
    }
    inline SemanticZoom::SemanticZoom() :
        SemanticZoom(impl::call_factory_cast<SemanticZoom(*)(winrt::Windows::Foundation::IActivationFactory const&), SemanticZoom>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<SemanticZoom>(); }))
    {
    }
    inline auto SemanticZoom::ZoomedInViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISemanticZoomStatics const&), SemanticZoom, ISemanticZoomStatics>([](ISemanticZoomStatics const& f) { return f.ZoomedInViewProperty(); });
    }
    inline auto SemanticZoom::ZoomedOutViewProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISemanticZoomStatics const&), SemanticZoom, ISemanticZoomStatics>([](ISemanticZoomStatics const& f) { return f.ZoomedOutViewProperty(); });
    }
    inline auto SemanticZoom::IsZoomedInViewActiveProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISemanticZoomStatics const&), SemanticZoom, ISemanticZoomStatics>([](ISemanticZoomStatics const& f) { return f.IsZoomedInViewActiveProperty(); });
    }
    inline auto SemanticZoom::CanChangeViewsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISemanticZoomStatics const&), SemanticZoom, ISemanticZoomStatics>([](ISemanticZoomStatics const& f) { return f.CanChangeViewsProperty(); });
    }
    inline auto SemanticZoom::IsZoomOutButtonEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISemanticZoomStatics const&), SemanticZoom, ISemanticZoomStatics>([](ISemanticZoomStatics const& f) { return f.IsZoomOutButtonEnabledProperty(); });
    }
    inline SemanticZoomLocation::SemanticZoomLocation() :
        SemanticZoomLocation(impl::call_factory_cast<SemanticZoomLocation(*)(winrt::Windows::Foundation::IActivationFactory const&), SemanticZoomLocation>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<SemanticZoomLocation>(); }))
    {
    }
    inline SemanticZoomViewChangedEventArgs::SemanticZoomViewChangedEventArgs() :
        SemanticZoomViewChangedEventArgs(impl::call_factory_cast<SemanticZoomViewChangedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), SemanticZoomViewChangedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<SemanticZoomViewChangedEventArgs>(); }))
    {
    }
    inline Slider::Slider()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<Slider, ISliderFactory>([&](ISliderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto Slider::IntermediateValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.IntermediateValueProperty(); });
    }
    inline auto Slider::StepFrequencyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.StepFrequencyProperty(); });
    }
    inline auto Slider::SnapsToProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.SnapsToProperty(); });
    }
    inline auto Slider::TickFrequencyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.TickFrequencyProperty(); });
    }
    inline auto Slider::TickPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.TickPlacementProperty(); });
    }
    inline auto Slider::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto Slider::IsDirectionReversedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.IsDirectionReversedProperty(); });
    }
    inline auto Slider::IsThumbToolTipEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.IsThumbToolTipEnabledProperty(); });
    }
    inline auto Slider::ThumbToolTipValueConverterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.ThumbToolTipValueConverterProperty(); });
    }
    inline auto Slider::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto Slider::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISliderStatics const&), Slider, ISliderStatics>([](ISliderStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline SplitButton::SplitButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SplitButton, ISplitButtonFactory>([&](ISplitButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SplitButton::FlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitButtonStatics const&), SplitButton, ISplitButtonStatics>([](ISplitButtonStatics const& f) { return f.FlyoutProperty(); });
    }
    inline auto SplitButton::CommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitButtonStatics const&), SplitButton, ISplitButtonStatics>([](ISplitButtonStatics const& f) { return f.CommandProperty(); });
    }
    inline auto SplitButton::CommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitButtonStatics const&), SplitButton, ISplitButtonStatics>([](ISplitButtonStatics const& f) { return f.CommandParameterProperty(); });
    }
    inline SplitView::SplitView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SplitView, ISplitViewFactory>([&](ISplitViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SplitView::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.ContentProperty(); });
    }
    inline auto SplitView::PaneProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.PaneProperty(); });
    }
    inline auto SplitView::IsPaneOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.IsPaneOpenProperty(); });
    }
    inline auto SplitView::OpenPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.OpenPaneLengthProperty(); });
    }
    inline auto SplitView::CompactPaneLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.CompactPaneLengthProperty(); });
    }
    inline auto SplitView::PanePlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.PanePlacementProperty(); });
    }
    inline auto SplitView::DisplayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.DisplayModeProperty(); });
    }
    inline auto SplitView::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline auto SplitView::PaneBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.PaneBackgroundProperty(); });
    }
    inline auto SplitView::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISplitViewStatics const&), SplitView, ISplitViewStatics>([](ISplitViewStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline StackLayout::StackLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<StackLayout, IStackLayoutFactory>([&](IStackLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto StackLayout::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackLayoutStatics const&), StackLayout, IStackLayoutStatics>([](IStackLayoutStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto StackLayout::SpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackLayoutStatics const&), StackLayout, IStackLayoutStatics>([](IStackLayoutStatics const& f) { return f.SpacingProperty(); });
    }
    inline StackPanel::StackPanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<StackPanel, IStackPanelFactory>([&](IStackPanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto StackPanel::AreScrollSnapPointsRegularProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.AreScrollSnapPointsRegularProperty(); });
    }
    inline auto StackPanel::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto StackPanel::BackgroundSizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.BackgroundSizingProperty(); });
    }
    inline auto StackPanel::BorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.BorderBrushProperty(); });
    }
    inline auto StackPanel::BorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.BorderThicknessProperty(); });
    }
    inline auto StackPanel::CornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.CornerRadiusProperty(); });
    }
    inline auto StackPanel::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto StackPanel::SpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IStackPanelStatics const&), StackPanel, IStackPanelStatics>([](IStackPanelStatics const& f) { return f.SpacingProperty(); });
    }
    inline StyleSelector::StyleSelector()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<StyleSelector, IStyleSelectorFactory>([&](IStyleSelectorFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline SwapChainBackgroundPanel::SwapChainBackgroundPanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SwapChainBackgroundPanel, ISwapChainBackgroundPanelFactory>([&](ISwapChainBackgroundPanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline SwapChainPanel::SwapChainPanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SwapChainPanel, ISwapChainPanelFactory>([&](ISwapChainPanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SwapChainPanel::CompositionScaleXProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwapChainPanelStatics const&), SwapChainPanel, ISwapChainPanelStatics>([](ISwapChainPanelStatics const& f) { return f.CompositionScaleXProperty(); });
    }
    inline auto SwapChainPanel::CompositionScaleYProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwapChainPanelStatics const&), SwapChainPanel, ISwapChainPanelStatics>([](ISwapChainPanelStatics const& f) { return f.CompositionScaleYProperty(); });
    }
    inline SwipeControl::SwipeControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SwipeControl, ISwipeControlFactory>([&](ISwipeControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SwipeControl::LeftItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeControlStatics const&), SwipeControl, ISwipeControlStatics>([](ISwipeControlStatics const& f) { return f.LeftItemsProperty(); });
    }
    inline auto SwipeControl::RightItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeControlStatics const&), SwipeControl, ISwipeControlStatics>([](ISwipeControlStatics const& f) { return f.RightItemsProperty(); });
    }
    inline auto SwipeControl::TopItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeControlStatics const&), SwipeControl, ISwipeControlStatics>([](ISwipeControlStatics const& f) { return f.TopItemsProperty(); });
    }
    inline auto SwipeControl::BottomItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeControlStatics const&), SwipeControl, ISwipeControlStatics>([](ISwipeControlStatics const& f) { return f.BottomItemsProperty(); });
    }
    inline SwipeItem::SwipeItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SwipeItem, ISwipeItemFactory>([&](ISwipeItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SwipeItem::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.IconSourceProperty(); });
    }
    inline auto SwipeItem::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.TextProperty(); });
    }
    inline auto SwipeItem::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto SwipeItem::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto SwipeItem::CommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.CommandProperty(); });
    }
    inline auto SwipeItem::CommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.CommandParameterProperty(); });
    }
    inline auto SwipeItem::BehaviorOnInvokedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemStatics const&), SwipeItem, ISwipeItemStatics>([](ISwipeItemStatics const& f) { return f.BehaviorOnInvokedProperty(); });
    }
    inline SwipeItems::SwipeItems()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SwipeItems, ISwipeItemsFactory>([&](ISwipeItemsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SwipeItems::ModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISwipeItemsStatics const&), SwipeItems, ISwipeItemsStatics>([](ISwipeItemsStatics const& f) { return f.ModeProperty(); });
    }
    inline SymbolIcon::SymbolIcon() :
        SymbolIcon(impl::call_factory_cast<SymbolIcon(*)(winrt::Windows::Foundation::IActivationFactory const&), SymbolIcon>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<SymbolIcon>(); }))
    {
    }
    inline SymbolIcon::SymbolIcon(winrt::Microsoft::UI::Xaml::Controls::Symbol const& symbol) :
        SymbolIcon(impl::call_factory<SymbolIcon, ISymbolIconFactory>([&](ISymbolIconFactory const& f) { return f.CreateInstanceWithSymbol(symbol); }))
    {
    }
    inline auto SymbolIcon::SymbolProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISymbolIconStatics const&), SymbolIcon, ISymbolIconStatics>([](ISymbolIconStatics const& f) { return f.SymbolProperty(); });
    }
    inline SymbolIconSource::SymbolIconSource()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<SymbolIconSource, ISymbolIconSourceFactory>([&](ISymbolIconSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto SymbolIconSource::SymbolProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISymbolIconSourceStatics const&), SymbolIconSource, ISymbolIconSourceStatics>([](ISymbolIconSourceStatics const& f) { return f.SymbolProperty(); });
    }
    inline TabView::TabView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TabView, ITabViewFactory>([&](ITabViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TabView::TabWidthModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabWidthModeProperty(); });
    }
    inline auto TabView::TabStripHeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabStripHeaderProperty(); });
    }
    inline auto TabView::TabStripHeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabStripHeaderTemplateProperty(); });
    }
    inline auto TabView::TabStripFooterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabStripFooterProperty(); });
    }
    inline auto TabView::TabStripFooterTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabStripFooterTemplateProperty(); });
    }
    inline auto TabView::IsAddTabButtonVisibleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.IsAddTabButtonVisibleProperty(); });
    }
    inline auto TabView::AddTabButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.AddTabButtonCommandProperty(); });
    }
    inline auto TabView::AddTabButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.AddTabButtonCommandParameterProperty(); });
    }
    inline auto TabView::TabItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabItemsSourceProperty(); });
    }
    inline auto TabView::TabItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabItemsProperty(); });
    }
    inline auto TabView::TabItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabItemTemplateProperty(); });
    }
    inline auto TabView::TabItemTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.TabItemTemplateSelectorProperty(); });
    }
    inline auto TabView::CloseButtonOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.CloseButtonOverlayModeProperty(); });
    }
    inline auto TabView::CanDragTabsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.CanDragTabsProperty(); });
    }
    inline auto TabView::CanReorderTabsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.CanReorderTabsProperty(); });
    }
    inline auto TabView::AllowDropTabsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.AllowDropTabsProperty(); });
    }
    inline auto TabView::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto TabView::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics const&), TabView, ITabViewStatics>([](ITabViewStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto TabView::CanTearOutTabsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewStatics2 const&), TabView, ITabViewStatics2>([](ITabViewStatics2 const& f) { return f.CanTearOutTabsProperty(); });
    }
    inline TabViewItem::TabViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TabViewItem, ITabViewItemFactory>([&](ITabViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TabViewItem::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemStatics const&), TabViewItem, ITabViewItemStatics>([](ITabViewItemStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto TabViewItem::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemStatics const&), TabViewItem, ITabViewItemStatics>([](ITabViewItemStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto TabViewItem::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemStatics const&), TabViewItem, ITabViewItemStatics>([](ITabViewItemStatics const& f) { return f.IconSourceProperty(); });
    }
    inline auto TabViewItem::IsClosableProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemStatics const&), TabViewItem, ITabViewItemStatics>([](ITabViewItemStatics const& f) { return f.IsClosableProperty(); });
    }
    inline auto TabViewItem::TabViewTemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemStatics const&), TabViewItem, ITabViewItemStatics>([](ITabViewItemStatics const& f) { return f.TabViewTemplateSettingsProperty(); });
    }
    inline TabViewItemTemplateSettings::TabViewItemTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TabViewItemTemplateSettings, ITabViewItemTemplateSettingsFactory>([&](ITabViewItemTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TabViewItemTemplateSettings::IconElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemTemplateSettingsStatics const&), TabViewItemTemplateSettings, ITabViewItemTemplateSettingsStatics>([](ITabViewItemTemplateSettingsStatics const& f) { return f.IconElementProperty(); });
    }
    inline auto TabViewItemTemplateSettings::TabGeometryProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITabViewItemTemplateSettingsStatics2 const&), TabViewItemTemplateSettings, ITabViewItemTemplateSettingsStatics2>([](ITabViewItemTemplateSettingsStatics2 const& f) { return f.TabGeometryProperty(); });
    }
    inline TeachingTip::TeachingTip()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TeachingTip, ITeachingTipFactory>([&](ITeachingTipFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TeachingTip::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto TeachingTip::TargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.TargetProperty(); });
    }
    inline auto TeachingTip::TailVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.TailVisibilityProperty(); });
    }
    inline auto TeachingTip::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.TitleProperty(); });
    }
    inline auto TeachingTip::SubtitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.SubtitleProperty(); });
    }
    inline auto TeachingTip::ActionButtonContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.ActionButtonContentProperty(); });
    }
    inline auto TeachingTip::ActionButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.ActionButtonStyleProperty(); });
    }
    inline auto TeachingTip::ActionButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.ActionButtonCommandProperty(); });
    }
    inline auto TeachingTip::ActionButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.ActionButtonCommandParameterProperty(); });
    }
    inline auto TeachingTip::CloseButtonContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.CloseButtonContentProperty(); });
    }
    inline auto TeachingTip::CloseButtonStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.CloseButtonStyleProperty(); });
    }
    inline auto TeachingTip::CloseButtonCommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.CloseButtonCommandProperty(); });
    }
    inline auto TeachingTip::CloseButtonCommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.CloseButtonCommandParameterProperty(); });
    }
    inline auto TeachingTip::PlacementMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.PlacementMarginProperty(); });
    }
    inline auto TeachingTip::ShouldConstrainToRootBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.ShouldConstrainToRootBoundsProperty(); });
    }
    inline auto TeachingTip::IsLightDismissEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.IsLightDismissEnabledProperty(); });
    }
    inline auto TeachingTip::PreferredPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.PreferredPlacementProperty(); });
    }
    inline auto TeachingTip::HeroContentPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.HeroContentPlacementProperty(); });
    }
    inline auto TeachingTip::HeroContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.HeroContentProperty(); });
    }
    inline auto TeachingTip::IconSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.IconSourceProperty(); });
    }
    inline auto TeachingTip::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipStatics const&), TeachingTip, ITeachingTipStatics>([](ITeachingTipStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline TeachingTipTemplateSettings::TeachingTipTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TeachingTipTemplateSettings, ITeachingTipTemplateSettingsFactory>([&](ITeachingTipTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TeachingTipTemplateSettings::TopRightHighlightMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipTemplateSettingsStatics const&), TeachingTipTemplateSettings, ITeachingTipTemplateSettingsStatics>([](ITeachingTipTemplateSettingsStatics const& f) { return f.TopRightHighlightMarginProperty(); });
    }
    inline auto TeachingTipTemplateSettings::TopLeftHighlightMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipTemplateSettingsStatics const&), TeachingTipTemplateSettings, ITeachingTipTemplateSettingsStatics>([](ITeachingTipTemplateSettingsStatics const& f) { return f.TopLeftHighlightMarginProperty(); });
    }
    inline auto TeachingTipTemplateSettings::IconElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITeachingTipTemplateSettingsStatics const&), TeachingTipTemplateSettings, ITeachingTipTemplateSettingsStatics>([](ITeachingTipTemplateSettingsStatics const& f) { return f.IconElementProperty(); });
    }
    inline TextBlock::TextBlock() :
        TextBlock(impl::call_factory_cast<TextBlock(*)(winrt::Windows::Foundation::IActivationFactory const&), TextBlock>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<TextBlock>(); }))
    {
    }
    inline auto TextBlock::FontSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.FontSizeProperty(); });
    }
    inline auto TextBlock::FontFamilyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.FontFamilyProperty(); });
    }
    inline auto TextBlock::FontWeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.FontWeightProperty(); });
    }
    inline auto TextBlock::FontStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.FontStyleProperty(); });
    }
    inline auto TextBlock::FontStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.FontStretchProperty(); });
    }
    inline auto TextBlock::CharacterSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.CharacterSpacingProperty(); });
    }
    inline auto TextBlock::ForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.ForegroundProperty(); });
    }
    inline auto TextBlock::TextWrappingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextWrappingProperty(); });
    }
    inline auto TextBlock::TextTrimmingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextTrimmingProperty(); });
    }
    inline auto TextBlock::TextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextAlignmentProperty(); });
    }
    inline auto TextBlock::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextProperty(); });
    }
    inline auto TextBlock::PaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.PaddingProperty(); });
    }
    inline auto TextBlock::LineHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.LineHeightProperty(); });
    }
    inline auto TextBlock::LineStackingStrategyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.LineStackingStrategyProperty(); });
    }
    inline auto TextBlock::IsTextSelectionEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.IsTextSelectionEnabledProperty(); });
    }
    inline auto TextBlock::SelectedTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.SelectedTextProperty(); });
    }
    inline auto TextBlock::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto TextBlock::MaxLinesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.MaxLinesProperty(); });
    }
    inline auto TextBlock::TextLineBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextLineBoundsProperty(); });
    }
    inline auto TextBlock::OpticalMarginAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.OpticalMarginAlignmentProperty(); });
    }
    inline auto TextBlock::IsColorFontEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.IsColorFontEnabledProperty(); });
    }
    inline auto TextBlock::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline auto TextBlock::IsTextScaleFactorEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.IsTextScaleFactorEnabledProperty(); });
    }
    inline auto TextBlock::TextDecorationsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.TextDecorationsProperty(); });
    }
    inline auto TextBlock::IsTextTrimmedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.IsTextTrimmedProperty(); });
    }
    inline auto TextBlock::HorizontalTextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.HorizontalTextAlignmentProperty(); });
    }
    inline auto TextBlock::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBlockStatics const&), TextBlock, ITextBlockStatics>([](ITextBlockStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline TextBox::TextBox()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TextBox, ITextBoxFactory>([&](ITextBoxFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TextBox::TextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.TextProperty(); });
    }
    inline auto TextBox::MaxLengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.MaxLengthProperty(); });
    }
    inline auto TextBox::IsReadOnlyProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.IsReadOnlyProperty(); });
    }
    inline auto TextBox::AcceptsReturnProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.AcceptsReturnProperty(); });
    }
    inline auto TextBox::TextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.TextAlignmentProperty(); });
    }
    inline auto TextBox::TextWrappingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.TextWrappingProperty(); });
    }
    inline auto TextBox::IsSpellCheckEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.IsSpellCheckEnabledProperty(); });
    }
    inline auto TextBox::IsTextPredictionEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.IsTextPredictionEnabledProperty(); });
    }
    inline auto TextBox::InputScopeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.InputScopeProperty(); });
    }
    inline auto TextBox::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto TextBox::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto TextBox::PlaceholderTextProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.PlaceholderTextProperty(); });
    }
    inline auto TextBox::SelectionHighlightColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.SelectionHighlightColorProperty(); });
    }
    inline auto TextBox::PreventKeyboardDisplayOnProgrammaticFocusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.PreventKeyboardDisplayOnProgrammaticFocusProperty(); });
    }
    inline auto TextBox::IsColorFontEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.IsColorFontEnabledProperty(); });
    }
    inline auto TextBox::SelectionHighlightColorWhenNotFocusedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.SelectionHighlightColorWhenNotFocusedProperty(); });
    }
    inline auto TextBox::HorizontalTextAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.HorizontalTextAlignmentProperty(); });
    }
    inline auto TextBox::CharacterCasingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.CharacterCasingProperty(); });
    }
    inline auto TextBox::PlaceholderForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.PlaceholderForegroundProperty(); });
    }
    inline auto TextBox::CanPasteClipboardContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.CanPasteClipboardContentProperty(); });
    }
    inline auto TextBox::CanUndoProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.CanUndoProperty(); });
    }
    inline auto TextBox::CanRedoProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.CanRedoProperty(); });
    }
    inline auto TextBox::SelectionFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.SelectionFlyoutProperty(); });
    }
    inline auto TextBox::ProofingMenuFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.ProofingMenuFlyoutProperty(); });
    }
    inline auto TextBox::DescriptionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.DescriptionProperty(); });
    }
    inline auto TextBox::DesiredCandidateWindowAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.DesiredCandidateWindowAlignmentProperty(); });
    }
    inline auto TextBox::TextReadingOrderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITextBoxStatics const&), TextBox, ITextBoxStatics>([](ITextBoxStatics const& f) { return f.TextReadingOrderProperty(); });
    }
    inline TextCommandBarFlyout::TextCommandBarFlyout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TextCommandBarFlyout, ITextCommandBarFlyoutFactory>([&](ITextCommandBarFlyoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline TimePickedEventArgs::TimePickedEventArgs() :
        TimePickedEventArgs(impl::call_factory_cast<TimePickedEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), TimePickedEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<TimePickedEventArgs>(); }))
    {
    }
    inline TimePicker::TimePicker()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TimePicker, ITimePickerFactory>([&](ITimePickerFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TimePicker::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto TimePicker::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto TimePicker::ClockIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.ClockIdentifierProperty(); });
    }
    inline auto TimePicker::MinuteIncrementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.MinuteIncrementProperty(); });
    }
    inline auto TimePicker::TimeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.TimeProperty(); });
    }
    inline auto TimePicker::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto TimePicker::SelectedTimeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerStatics const&), TimePicker, ITimePickerStatics>([](ITimePickerStatics const& f) { return f.SelectedTimeProperty(); });
    }
    inline TimePickerFlyout::TimePickerFlyout() :
        TimePickerFlyout(impl::call_factory_cast<TimePickerFlyout(*)(winrt::Windows::Foundation::IActivationFactory const&), TimePickerFlyout>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<TimePickerFlyout>(); }))
    {
    }
    inline auto TimePickerFlyout::ClockIdentifierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerFlyoutStatics const&), TimePickerFlyout, ITimePickerFlyoutStatics>([](ITimePickerFlyoutStatics const& f) { return f.ClockIdentifierProperty(); });
    }
    inline auto TimePickerFlyout::TimeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerFlyoutStatics const&), TimePickerFlyout, ITimePickerFlyoutStatics>([](ITimePickerFlyoutStatics const& f) { return f.TimeProperty(); });
    }
    inline auto TimePickerFlyout::MinuteIncrementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerFlyoutStatics const&), TimePickerFlyout, ITimePickerFlyoutStatics>([](ITimePickerFlyoutStatics const& f) { return f.MinuteIncrementProperty(); });
    }
    inline auto TimePickerFlyoutPresenter::IsDefaultShadowEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITimePickerFlyoutPresenterStatics const&), TimePickerFlyoutPresenter, ITimePickerFlyoutPresenterStatics>([](ITimePickerFlyoutPresenterStatics const& f) { return f.IsDefaultShadowEnabledProperty(); });
    }
    inline ToggleMenuFlyoutItem::ToggleMenuFlyoutItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ToggleMenuFlyoutItem, IToggleMenuFlyoutItemFactory>([&](IToggleMenuFlyoutItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ToggleMenuFlyoutItem::IsCheckedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleMenuFlyoutItemStatics const&), ToggleMenuFlyoutItem, IToggleMenuFlyoutItemStatics>([](IToggleMenuFlyoutItemStatics const& f) { return f.IsCheckedProperty(); });
    }
    inline ToggleSplitButton::ToggleSplitButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ToggleSplitButton, IToggleSplitButtonFactory>([&](IToggleSplitButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ToggleSplitButton::IsCheckedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSplitButtonStatics const&), ToggleSplitButton, IToggleSplitButtonStatics>([](IToggleSplitButtonStatics const& f) { return f.IsCheckedProperty(); });
    }
    inline ToggleSwitch::ToggleSwitch() :
        ToggleSwitch(impl::call_factory_cast<ToggleSwitch(*)(winrt::Windows::Foundation::IActivationFactory const&), ToggleSwitch>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ToggleSwitch>(); }))
    {
    }
    inline auto ToggleSwitch::IsOnProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.IsOnProperty(); });
    }
    inline auto ToggleSwitch::HeaderProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.HeaderProperty(); });
    }
    inline auto ToggleSwitch::HeaderTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.HeaderTemplateProperty(); });
    }
    inline auto ToggleSwitch::OnContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.OnContentProperty(); });
    }
    inline auto ToggleSwitch::OnContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.OnContentTemplateProperty(); });
    }
    inline auto ToggleSwitch::OffContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.OffContentProperty(); });
    }
    inline auto ToggleSwitch::OffContentTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleSwitchStatics const&), ToggleSwitch, IToggleSwitchStatics>([](IToggleSwitchStatics const& f) { return f.OffContentTemplateProperty(); });
    }
    inline ToolTip::ToolTip()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ToolTip, IToolTipFactory>([&](IToolTipFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ToolTip::HorizontalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.HorizontalOffsetProperty(); });
    }
    inline auto ToolTip::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto ToolTip::PlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.PlacementProperty(); });
    }
    inline auto ToolTip::PlacementTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.PlacementTargetProperty(); });
    }
    inline auto ToolTip::PlacementRectProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.PlacementRectProperty(); });
    }
    inline auto ToolTip::VerticalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipStatics const&), ToolTip, IToolTipStatics>([](IToolTipStatics const& f) { return f.VerticalOffsetProperty(); });
    }
    inline auto ToolTipService::PlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipServiceStatics const&), ToolTipService, IToolTipServiceStatics>([](IToolTipServiceStatics const& f) { return f.PlacementProperty(); });
    }
    inline auto ToolTipService::GetPlacement(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.GetPlacement(element); });
    }
    inline auto ToolTipService::SetPlacement(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::Primitives::PlacementMode const& value)
    {
        impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.SetPlacement(element, value); });
    }
    inline auto ToolTipService::PlacementTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipServiceStatics const&), ToolTipService, IToolTipServiceStatics>([](IToolTipServiceStatics const& f) { return f.PlacementTargetProperty(); });
    }
    inline auto ToolTipService::GetPlacementTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.GetPlacementTarget(element); });
    }
    inline auto ToolTipService::SetPlacementTarget(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::UIElement const& value)
    {
        impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.SetPlacementTarget(element, value); });
    }
    inline auto ToolTipService::ToolTipProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToolTipServiceStatics const&), ToolTipService, IToolTipServiceStatics>([](IToolTipServiceStatics const& f) { return f.ToolTipProperty(); });
    }
    inline auto ToolTipService::GetToolTip(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.GetToolTip(element); });
    }
    inline auto ToolTipService::SetToolTip(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& value)
    {
        impl::call_factory<ToolTipService, IToolTipServiceStatics>([&](IToolTipServiceStatics const& f) { return f.SetToolTip(element, value); });
    }
    inline TreeView::TreeView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TreeView, ITreeViewFactory>([&](ITreeViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TreeView::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics const&), TreeView, ITreeViewStatics>([](ITreeViewStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto TreeView::SelectionModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics const&), TreeView, ITreeViewStatics>([](ITreeViewStatics const& f) { return f.SelectionModeProperty(); });
    }
    inline auto TreeView::CanDragItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.CanDragItemsProperty(); });
    }
    inline auto TreeView::CanReorderItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.CanReorderItemsProperty(); });
    }
    inline auto TreeView::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemTemplateProperty(); });
    }
    inline auto TreeView::ItemTemplateSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemTemplateSelectorProperty(); });
    }
    inline auto TreeView::ItemContainerStyleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemContainerStyleProperty(); });
    }
    inline auto TreeView::ItemContainerStyleSelectorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemContainerStyleSelectorProperty(); });
    }
    inline auto TreeView::ItemContainerTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemContainerTransitionsProperty(); });
    }
    inline auto TreeView::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewStatics2 const&), TreeView, ITreeViewStatics2>([](ITreeViewStatics2 const& f) { return f.ItemsSourceProperty(); });
    }
    inline TreeViewItem::TreeViewItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TreeViewItem, ITreeViewItemFactory>([&](ITreeViewItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TreeViewItem::GlyphOpacityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.GlyphOpacityProperty(); });
    }
    inline auto TreeViewItem::GlyphBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.GlyphBrushProperty(); });
    }
    inline auto TreeViewItem::ExpandedGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.ExpandedGlyphProperty(); });
    }
    inline auto TreeViewItem::CollapsedGlyphProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.CollapsedGlyphProperty(); });
    }
    inline auto TreeViewItem::GlyphSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.GlyphSizeProperty(); });
    }
    inline auto TreeViewItem::IsExpandedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.IsExpandedProperty(); });
    }
    inline auto TreeViewItem::TreeViewItemTemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics const&), TreeViewItem, ITreeViewItemStatics>([](ITreeViewItemStatics const& f) { return f.TreeViewItemTemplateSettingsProperty(); });
    }
    inline auto TreeViewItem::HasUnrealizedChildrenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics2 const&), TreeViewItem, ITreeViewItemStatics2>([](ITreeViewItemStatics2 const& f) { return f.HasUnrealizedChildrenProperty(); });
    }
    inline auto TreeViewItem::ItemsSourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemStatics2 const&), TreeViewItem, ITreeViewItemStatics2>([](ITreeViewItemStatics2 const& f) { return f.ItemsSourceProperty(); });
    }
    inline TreeViewItemTemplateSettings::TreeViewItemTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsFactory>([&](ITreeViewItemTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TreeViewItemTemplateSettings::ExpandedGlyphVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemTemplateSettingsStatics const&), TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsStatics>([](ITreeViewItemTemplateSettingsStatics const& f) { return f.ExpandedGlyphVisibilityProperty(); });
    }
    inline auto TreeViewItemTemplateSettings::CollapsedGlyphVisibilityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemTemplateSettingsStatics const&), TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsStatics>([](ITreeViewItemTemplateSettingsStatics const& f) { return f.CollapsedGlyphVisibilityProperty(); });
    }
    inline auto TreeViewItemTemplateSettings::IndentationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemTemplateSettingsStatics const&), TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsStatics>([](ITreeViewItemTemplateSettingsStatics const& f) { return f.IndentationProperty(); });
    }
    inline auto TreeViewItemTemplateSettings::DragItemsCountProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewItemTemplateSettingsStatics const&), TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsStatics>([](ITreeViewItemTemplateSettingsStatics const& f) { return f.DragItemsCountProperty(); });
    }
    inline TreeViewList::TreeViewList()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TreeViewList, ITreeViewListFactory>([&](ITreeViewListFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline TreeViewNode::TreeViewNode()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TreeViewNode, ITreeViewNodeFactory>([&](ITreeViewNodeFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TreeViewNode::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewNodeStatics const&), TreeViewNode, ITreeViewNodeStatics>([](ITreeViewNodeStatics const& f) { return f.ContentProperty(); });
    }
    inline auto TreeViewNode::DepthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewNodeStatics const&), TreeViewNode, ITreeViewNodeStatics>([](ITreeViewNodeStatics const& f) { return f.DepthProperty(); });
    }
    inline auto TreeViewNode::IsExpandedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewNodeStatics const&), TreeViewNode, ITreeViewNodeStatics>([](ITreeViewNodeStatics const& f) { return f.IsExpandedProperty(); });
    }
    inline auto TreeViewNode::HasChildrenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITreeViewNodeStatics const&), TreeViewNode, ITreeViewNodeStatics>([](ITreeViewNodeStatics const& f) { return f.HasChildrenProperty(); });
    }
    inline TwoPaneView::TwoPaneView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TwoPaneView, ITwoPaneViewFactory>([&](ITwoPaneViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto TwoPaneView::Pane1Property()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.Pane1Property(); });
    }
    inline auto TwoPaneView::Pane2Property()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.Pane2Property(); });
    }
    inline auto TwoPaneView::Pane1LengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.Pane1LengthProperty(); });
    }
    inline auto TwoPaneView::Pane2LengthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.Pane2LengthProperty(); });
    }
    inline auto TwoPaneView::PanePriorityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.PanePriorityProperty(); });
    }
    inline auto TwoPaneView::ModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.ModeProperty(); });
    }
    inline auto TwoPaneView::WideModeConfigurationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.WideModeConfigurationProperty(); });
    }
    inline auto TwoPaneView::TallModeConfigurationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.TallModeConfigurationProperty(); });
    }
    inline auto TwoPaneView::MinWideModeWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.MinWideModeWidthProperty(); });
    }
    inline auto TwoPaneView::MinTallModeHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITwoPaneViewStatics const&), TwoPaneView, ITwoPaneViewStatics>([](ITwoPaneViewStatics const& f) { return f.MinTallModeHeightProperty(); });
    }
    inline UniformGridLayout::UniformGridLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<UniformGridLayout, IUniformGridLayoutFactory>([&](IUniformGridLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto UniformGridLayout::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto UniformGridLayout::MinItemWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.MinItemWidthProperty(); });
    }
    inline auto UniformGridLayout::MinItemHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.MinItemHeightProperty(); });
    }
    inline auto UniformGridLayout::MinRowSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.MinRowSpacingProperty(); });
    }
    inline auto UniformGridLayout::MinColumnSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.MinColumnSpacingProperty(); });
    }
    inline auto UniformGridLayout::ItemsJustificationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.ItemsJustificationProperty(); });
    }
    inline auto UniformGridLayout::ItemsStretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.ItemsStretchProperty(); });
    }
    inline auto UniformGridLayout::MaximumRowsOrColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUniformGridLayoutStatics const&), UniformGridLayout, IUniformGridLayoutStatics>([](IUniformGridLayoutStatics const& f) { return f.MaximumRowsOrColumnsProperty(); });
    }
    inline UserControl::UserControl()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<UserControl, IUserControlFactory>([&](IUserControlFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto UserControl::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IUserControlStatics const&), UserControl, IUserControlStatics>([](IUserControlStatics const& f) { return f.ContentProperty(); });
    }
    inline VariableSizedWrapGrid::VariableSizedWrapGrid() :
        VariableSizedWrapGrid(impl::call_factory_cast<VariableSizedWrapGrid(*)(winrt::Windows::Foundation::IActivationFactory const&), VariableSizedWrapGrid>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<VariableSizedWrapGrid>(); }))
    {
    }
    inline auto VariableSizedWrapGrid::ItemHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.ItemHeightProperty(); });
    }
    inline auto VariableSizedWrapGrid::ItemWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.ItemWidthProperty(); });
    }
    inline auto VariableSizedWrapGrid::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto VariableSizedWrapGrid::HorizontalChildrenAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.HorizontalChildrenAlignmentProperty(); });
    }
    inline auto VariableSizedWrapGrid::VerticalChildrenAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.VerticalChildrenAlignmentProperty(); });
    }
    inline auto VariableSizedWrapGrid::MaximumRowsOrColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.MaximumRowsOrColumnsProperty(); });
    }
    inline auto VariableSizedWrapGrid::RowSpanProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.RowSpanProperty(); });
    }
    inline auto VariableSizedWrapGrid::GetRowSpan(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([&](IVariableSizedWrapGridStatics const& f) { return f.GetRowSpan(element); });
    }
    inline auto VariableSizedWrapGrid::SetRowSpan(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value)
    {
        impl::call_factory<VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([&](IVariableSizedWrapGridStatics const& f) { return f.SetRowSpan(element, value); });
    }
    inline auto VariableSizedWrapGrid::ColumnSpanProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVariableSizedWrapGridStatics const&), VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([](IVariableSizedWrapGridStatics const& f) { return f.ColumnSpanProperty(); });
    }
    inline auto VariableSizedWrapGrid::GetColumnSpan(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([&](IVariableSizedWrapGridStatics const& f) { return f.GetColumnSpan(element); });
    }
    inline auto VariableSizedWrapGrid::SetColumnSpan(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t value)
    {
        impl::call_factory<VariableSizedWrapGrid, IVariableSizedWrapGridStatics>([&](IVariableSizedWrapGridStatics const& f) { return f.SetColumnSpan(element, value); });
    }
    inline Viewbox::Viewbox() :
        Viewbox(impl::call_factory_cast<Viewbox(*)(winrt::Windows::Foundation::IActivationFactory const&), Viewbox>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<Viewbox>(); }))
    {
    }
    inline auto Viewbox::StretchProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IViewboxStatics const&), Viewbox, IViewboxStatics>([](IViewboxStatics const& f) { return f.StretchProperty(); });
    }
    inline auto Viewbox::StretchDirectionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IViewboxStatics const&), Viewbox, IViewboxStatics>([](IViewboxStatics const& f) { return f.StretchDirectionProperty(); });
    }
    inline VirtualizingLayout::VirtualizingLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<VirtualizingLayout, IVirtualizingLayoutFactory>([&](IVirtualizingLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline VirtualizingLayoutContext::VirtualizingLayoutContext()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<VirtualizingLayoutContext, IVirtualizingLayoutContextFactory>([&](IVirtualizingLayoutContextFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline VirtualizingStackPanel::VirtualizingStackPanel() :
        VirtualizingStackPanel(impl::call_factory_cast<VirtualizingStackPanel(*)(winrt::Windows::Foundation::IActivationFactory const&), VirtualizingStackPanel>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<VirtualizingStackPanel>(); }))
    {
    }
    inline auto VirtualizingStackPanel::AreScrollSnapPointsRegularProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVirtualizingStackPanelStatics const&), VirtualizingStackPanel, IVirtualizingStackPanelStatics>([](IVirtualizingStackPanelStatics const& f) { return f.AreScrollSnapPointsRegularProperty(); });
    }
    inline auto VirtualizingStackPanel::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVirtualizingStackPanelStatics const&), VirtualizingStackPanel, IVirtualizingStackPanelStatics>([](IVirtualizingStackPanelStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto VirtualizingStackPanel::VirtualizationModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVirtualizingStackPanelStatics const&), VirtualizingStackPanel, IVirtualizingStackPanelStatics>([](IVirtualizingStackPanelStatics const& f) { return f.VirtualizationModeProperty(); });
    }
    inline auto VirtualizingStackPanel::GetVirtualizationMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<VirtualizingStackPanel, IVirtualizingStackPanelStatics>([&](IVirtualizingStackPanelStatics const& f) { return f.GetVirtualizationMode(element); });
    }
    inline auto VirtualizingStackPanel::SetVirtualizationMode(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Microsoft::UI::Xaml::Controls::VirtualizationMode const& value)
    {
        impl::call_factory<VirtualizingStackPanel, IVirtualizingStackPanelStatics>([&](IVirtualizingStackPanelStatics const& f) { return f.SetVirtualizationMode(element, value); });
    }
    inline auto VirtualizingStackPanel::IsVirtualizingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IVirtualizingStackPanelStatics const&), VirtualizingStackPanel, IVirtualizingStackPanelStatics>([](IVirtualizingStackPanelStatics const& f) { return f.IsVirtualizingProperty(); });
    }
    inline auto VirtualizingStackPanel::GetIsVirtualizing(winrt::Microsoft::UI::Xaml::DependencyObject const& o)
    {
        return impl::call_factory<VirtualizingStackPanel, IVirtualizingStackPanelStatics>([&](IVirtualizingStackPanelStatics const& f) { return f.GetIsVirtualizing(o); });
    }
    inline WebView2::WebView2()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<WebView2, IWebView2Factory>([&](IWebView2Factory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto WebView2::SourceProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWebView2Statics const&), WebView2, IWebView2Statics>([](IWebView2Statics const& f) { return f.SourceProperty(); });
    }
    inline auto WebView2::CanGoForwardProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWebView2Statics const&), WebView2, IWebView2Statics>([](IWebView2Statics const& f) { return f.CanGoForwardProperty(); });
    }
    inline auto WebView2::CanGoBackProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWebView2Statics const&), WebView2, IWebView2Statics>([](IWebView2Statics const& f) { return f.CanGoBackProperty(); });
    }
    inline auto WebView2::DefaultBackgroundColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWebView2Statics const&), WebView2, IWebView2Statics>([](IWebView2Statics const& f) { return f.DefaultBackgroundColorProperty(); });
    }
    inline WrapGrid::WrapGrid() :
        WrapGrid(impl::call_factory_cast<WrapGrid(*)(winrt::Windows::Foundation::IActivationFactory const&), WrapGrid>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<WrapGrid>(); }))
    {
    }
    inline auto WrapGrid::ItemWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.ItemWidthProperty(); });
    }
    inline auto WrapGrid::ItemHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.ItemHeightProperty(); });
    }
    inline auto WrapGrid::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto WrapGrid::HorizontalChildrenAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.HorizontalChildrenAlignmentProperty(); });
    }
    inline auto WrapGrid::VerticalChildrenAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.VerticalChildrenAlignmentProperty(); });
    }
    inline auto WrapGrid::MaximumRowsOrColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IWrapGridStatics const&), WrapGrid, IWrapGridStatics>([](IWrapGridStatics const& f) { return f.MaximumRowsOrColumnsProperty(); });
    }
    inline XamlControlsResources::XamlControlsResources() :
        XamlControlsResources(impl::call_factory_cast<XamlControlsResources(*)(winrt::Windows::Foundation::IActivationFactory const&), XamlControlsResources>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<XamlControlsResources>(); }))
    {
    }
    inline auto XamlControlsResources::EnsureRevealLights(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        impl::call_factory<XamlControlsResources, IXamlControlsResourcesStatics>([&](IXamlControlsResourcesStatics const& f) { return f.EnsureRevealLights(element); });
    }
    inline auto XamlControlsResources::UseCompactResourcesProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IXamlControlsResourcesStatics const&), XamlControlsResources, IXamlControlsResourcesStatics>([](IXamlControlsResourcesStatics const& f) { return f.UseCompactResourcesProperty(); });
    }
    template <typename L> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(L handler) :
        CalendarViewDayItemChangingEventHandler(impl::make_delegate<CalendarViewDayItemChangingEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(F* handler) :
        CalendarViewDayItemChangingEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(O* object, M method) :
        CalendarViewDayItemChangingEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(com_ptr<O>&& object, M method) :
        CalendarViewDayItemChangingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        CalendarViewDayItemChangingEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(std::shared_ptr<O>&& object, M method) :
        CalendarViewDayItemChangingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> CalendarViewDayItemChangingEventHandler::CalendarViewDayItemChangingEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        CalendarViewDayItemChangingEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto CalendarViewDayItemChangingEventHandler::operator()(winrt::Microsoft::UI::Xaml::Controls::CalendarView const& sender, winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<CalendarViewDayItemChangingEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(L handler) :
        CleanUpVirtualizedItemEventHandler(impl::make_delegate<CleanUpVirtualizedItemEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(F* handler) :
        CleanUpVirtualizedItemEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(O* object, M method) :
        CleanUpVirtualizedItemEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(com_ptr<O>&& object, M method) :
        CleanUpVirtualizedItemEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        CleanUpVirtualizedItemEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(std::shared_ptr<O>&& object, M method) :
        CleanUpVirtualizedItemEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> CleanUpVirtualizedItemEventHandler::CleanUpVirtualizedItemEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        CleanUpVirtualizedItemEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto CleanUpVirtualizedItemEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<CleanUpVirtualizedItemEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(L handler) :
        ContextMenuOpeningEventHandler(impl::make_delegate<ContextMenuOpeningEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(F* handler) :
        ContextMenuOpeningEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(O* object, M method) :
        ContextMenuOpeningEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(com_ptr<O>&& object, M method) :
        ContextMenuOpeningEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ContextMenuOpeningEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(std::shared_ptr<O>&& object, M method) :
        ContextMenuOpeningEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ContextMenuOpeningEventHandler::ContextMenuOpeningEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ContextMenuOpeningEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto ContextMenuOpeningEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::ContextMenuEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<ContextMenuOpeningEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> DragItemsStartingEventHandler::DragItemsStartingEventHandler(L handler) :
        DragItemsStartingEventHandler(impl::make_delegate<DragItemsStartingEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> DragItemsStartingEventHandler::DragItemsStartingEventHandler(F* handler) :
        DragItemsStartingEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> DragItemsStartingEventHandler::DragItemsStartingEventHandler(O* object, M method) :
        DragItemsStartingEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> DragItemsStartingEventHandler::DragItemsStartingEventHandler(com_ptr<O>&& object, M method) :
        DragItemsStartingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragItemsStartingEventHandler::DragItemsStartingEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        DragItemsStartingEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> DragItemsStartingEventHandler::DragItemsStartingEventHandler(std::shared_ptr<O>&& object, M method) :
        DragItemsStartingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragItemsStartingEventHandler::DragItemsStartingEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        DragItemsStartingEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto DragItemsStartingEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<DragItemsStartingEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(L handler) :
        HubSectionHeaderClickEventHandler(impl::make_delegate<HubSectionHeaderClickEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(F* handler) :
        HubSectionHeaderClickEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(O* object, M method) :
        HubSectionHeaderClickEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(com_ptr<O>&& object, M method) :
        HubSectionHeaderClickEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        HubSectionHeaderClickEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(std::shared_ptr<O>&& object, M method) :
        HubSectionHeaderClickEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> HubSectionHeaderClickEventHandler::HubSectionHeaderClickEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        HubSectionHeaderClickEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto HubSectionHeaderClickEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<HubSectionHeaderClickEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> ItemClickEventHandler::ItemClickEventHandler(L handler) :
        ItemClickEventHandler(impl::make_delegate<ItemClickEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ItemClickEventHandler::ItemClickEventHandler(F* handler) :
        ItemClickEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ItemClickEventHandler::ItemClickEventHandler(O* object, M method) :
        ItemClickEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ItemClickEventHandler::ItemClickEventHandler(com_ptr<O>&& object, M method) :
        ItemClickEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ItemClickEventHandler::ItemClickEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ItemClickEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> ItemClickEventHandler::ItemClickEventHandler(std::shared_ptr<O>&& object, M method) :
        ItemClickEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ItemClickEventHandler::ItemClickEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ItemClickEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto ItemClickEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<ItemClickEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> ListViewItemToKeyHandler::ListViewItemToKeyHandler(L handler) :
        ListViewItemToKeyHandler(impl::make_delegate<ListViewItemToKeyHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ListViewItemToKeyHandler::ListViewItemToKeyHandler(F* handler) :
        ListViewItemToKeyHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ListViewItemToKeyHandler::ListViewItemToKeyHandler(O* object, M method) :
        ListViewItemToKeyHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ListViewItemToKeyHandler::ListViewItemToKeyHandler(com_ptr<O>&& object, M method) :
        ListViewItemToKeyHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ListViewItemToKeyHandler::ListViewItemToKeyHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ListViewItemToKeyHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> ListViewItemToKeyHandler::ListViewItemToKeyHandler(std::shared_ptr<O>&& object, M method) :
        ListViewItemToKeyHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ListViewItemToKeyHandler::ListViewItemToKeyHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ListViewItemToKeyHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto ListViewItemToKeyHandler::operator()(winrt::Windows::Foundation::IInspectable const& item) const
    {
        void* result{};
        check_hresult((*(impl::abi_t<ListViewItemToKeyHandler>**)this)->Invoke(*(void**)(&item), &result));
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename L> ListViewKeyToItemHandler::ListViewKeyToItemHandler(L handler) :
        ListViewKeyToItemHandler(impl::make_delegate<ListViewKeyToItemHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ListViewKeyToItemHandler::ListViewKeyToItemHandler(F* handler) :
        ListViewKeyToItemHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ListViewKeyToItemHandler::ListViewKeyToItemHandler(O* object, M method) :
        ListViewKeyToItemHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ListViewKeyToItemHandler::ListViewKeyToItemHandler(com_ptr<O>&& object, M method) :
        ListViewKeyToItemHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ListViewKeyToItemHandler::ListViewKeyToItemHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ListViewKeyToItemHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> ListViewKeyToItemHandler::ListViewKeyToItemHandler(std::shared_ptr<O>&& object, M method) :
        ListViewKeyToItemHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ListViewKeyToItemHandler::ListViewKeyToItemHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ListViewKeyToItemHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto ListViewKeyToItemHandler::operator()(param::hstring const& key) const
    {
        void* operation{};
        check_hresult((*(impl::abi_t<ListViewKeyToItemHandler>**)this)->Invoke(*(void**)(&key), &operation));
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::IInspectable>{ operation, take_ownership_from_abi };
    }
    template <typename L> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(L handler) :
        SectionsInViewChangedEventHandler(impl::make_delegate<SectionsInViewChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(F* handler) :
        SectionsInViewChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(O* object, M method) :
        SectionsInViewChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(com_ptr<O>&& object, M method) :
        SectionsInViewChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        SectionsInViewChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        SectionsInViewChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SectionsInViewChangedEventHandler::SectionsInViewChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        SectionsInViewChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto SectionsInViewChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<SectionsInViewChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> SelectionChangedEventHandler::SelectionChangedEventHandler(L handler) :
        SelectionChangedEventHandler(impl::make_delegate<SelectionChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> SelectionChangedEventHandler::SelectionChangedEventHandler(F* handler) :
        SelectionChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> SelectionChangedEventHandler::SelectionChangedEventHandler(O* object, M method) :
        SelectionChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> SelectionChangedEventHandler::SelectionChangedEventHandler(com_ptr<O>&& object, M method) :
        SelectionChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SelectionChangedEventHandler::SelectionChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        SelectionChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> SelectionChangedEventHandler::SelectionChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        SelectionChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SelectionChangedEventHandler::SelectionChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        SelectionChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto SelectionChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<SelectionChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(L handler) :
        SemanticZoomViewChangedEventHandler(impl::make_delegate<SemanticZoomViewChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(F* handler) :
        SemanticZoomViewChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(O* object, M method) :
        SemanticZoomViewChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(com_ptr<O>&& object, M method) :
        SemanticZoomViewChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        SemanticZoomViewChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        SemanticZoomViewChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> SemanticZoomViewChangedEventHandler::SemanticZoomViewChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        SemanticZoomViewChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto SemanticZoomViewChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<SemanticZoomViewChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> TextChangedEventHandler::TextChangedEventHandler(L handler) :
        TextChangedEventHandler(impl::make_delegate<TextChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> TextChangedEventHandler::TextChangedEventHandler(F* handler) :
        TextChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> TextChangedEventHandler::TextChangedEventHandler(O* object, M method) :
        TextChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> TextChangedEventHandler::TextChangedEventHandler(com_ptr<O>&& object, M method) :
        TextChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> TextChangedEventHandler::TextChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        TextChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> TextChangedEventHandler::TextChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        TextChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> TextChangedEventHandler::TextChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        TextChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto TextChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::TextChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<TextChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> TextControlPasteEventHandler::TextControlPasteEventHandler(L handler) :
        TextControlPasteEventHandler(impl::make_delegate<TextControlPasteEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> TextControlPasteEventHandler::TextControlPasteEventHandler(F* handler) :
        TextControlPasteEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> TextControlPasteEventHandler::TextControlPasteEventHandler(O* object, M method) :
        TextControlPasteEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> TextControlPasteEventHandler::TextControlPasteEventHandler(com_ptr<O>&& object, M method) :
        TextControlPasteEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> TextControlPasteEventHandler::TextControlPasteEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        TextControlPasteEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    template <typename O, typename M> TextControlPasteEventHandler::TextControlPasteEventHandler(std::shared_ptr<O>&& object, M method) :
        TextControlPasteEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> TextControlPasteEventHandler::TextControlPasteEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        TextControlPasteEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
            if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
            else lm(args...);
        } })
    {
    }
    inline auto TextControlPasteEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<TextControlPasteEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename D> auto IAppBarOverridesT<D>::OnClosed(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IAppBarOverrides>().OnClosed(e);
    }
    template <typename D> auto IAppBarOverridesT<D>::OnOpened(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IAppBarOverrides>().OnOpened(e);
    }
    template <typename D> auto IAppBarOverridesT<D>::OnClosing(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IAppBarOverrides>().OnClosing(e);
    }
    template <typename D> auto IAppBarOverridesT<D>::OnOpening(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IAppBarOverrides>().OnOpening(e);
    }
    template <typename D> auto IComboBoxOverridesT<D>::OnDropDownClosed(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IComboBoxOverrides>().OnDropDownClosed(e);
    }
    template <typename D> auto IComboBoxOverridesT<D>::OnDropDownOpened(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IComboBoxOverrides>().OnDropDownOpened(e);
    }
    template <typename D> auto IContentControlOverridesT<D>::OnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        return shim().template try_as<IContentControlOverrides>().OnContentChanged(oldContent, newContent);
    }
    template <typename D> auto IContentControlOverridesT<D>::OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate) const
    {
        return shim().template try_as<IContentControlOverrides>().OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
    }
    template <typename D> auto IContentControlOverridesT<D>::OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector) const
    {
        return shim().template try_as<IContentControlOverrides>().OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
    }
    template <typename D> auto IContentPresenterOverridesT<D>::OnContentTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldContentTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newContentTemplate) const
    {
        return shim().template try_as<IContentPresenterOverrides>().OnContentTemplateChanged(oldContentTemplate, newContentTemplate);
    }
    template <typename D> auto IContentPresenterOverridesT<D>::OnContentTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldContentTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newContentTemplateSelector) const
    {
        return shim().template try_as<IContentPresenterOverrides>().OnContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerEntered(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerEntered(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerPressed(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerPressed(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerMoved(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerMoved(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerReleased(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerReleased(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerExited(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerExited(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerCaptureLost(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerCaptureLost(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerCanceled(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerCanceled(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPointerWheelChanged(winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPointerWheelChanged(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnTapped(winrt::Microsoft::UI::Xaml::Input::TappedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnTapped(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnDoubleTapped(winrt::Microsoft::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnDoubleTapped(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnHolding(winrt::Microsoft::UI::Xaml::Input::HoldingRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnHolding(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnRightTapped(winrt::Microsoft::UI::Xaml::Input::RightTappedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnRightTapped(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnManipulationStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationStartingRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnManipulationStarting(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnManipulationInertiaStarting(winrt::Microsoft::UI::Xaml::Input::ManipulationInertiaStartingRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnManipulationInertiaStarting(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnManipulationStarted(winrt::Microsoft::UI::Xaml::Input::ManipulationStartedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnManipulationStarted(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnManipulationDelta(winrt::Microsoft::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnManipulationDelta(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnManipulationCompleted(winrt::Microsoft::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnManipulationCompleted(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnKeyUp(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnKeyDown(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPreviewKeyDown(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPreviewKeyDown(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnPreviewKeyUp(winrt::Microsoft::UI::Xaml::Input::KeyRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnPreviewKeyUp(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnGotFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnGotFocus(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnLostFocus(winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnLostFocus(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnCharacterReceived(winrt::Microsoft::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnCharacterReceived(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnDragEnter(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnDragEnter(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnDragLeave(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnDragLeave(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnDragOver(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnDragOver(e);
    }
    template <typename D> auto IControlOverridesT<D>::OnDrop(winrt::Microsoft::UI::Xaml::DragEventArgs const& e) const
    {
        return shim().template try_as<IControlOverrides>().OnDrop(e);
    }
    template <typename D> auto IDataTemplateSelectorOverridesT<D>::SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        return shim().template try_as<IDataTemplateSelectorOverrides>().SelectTemplateCore(item, container);
    }
    template <typename D> auto IDataTemplateSelectorOverridesT<D>::SelectTemplateCore(winrt::Windows::Foundation::IInspectable const& item) const
    {
        return shim().template try_as<IDataTemplateSelectorOverrides>().SelectTemplateCore(item);
    }
    template <typename D> auto IGroupStyleSelectorOverridesT<D>::SelectGroupStyleCore(winrt::Windows::Foundation::IInspectable const& group, uint32_t level) const
    {
        return shim().template try_as<IGroupStyleSelectorOverrides>().SelectGroupStyleCore(group, level);
    }
    template <typename D> auto IIconSourceOverridesT<D>::CreateIconElementCore() const
    {
        return shim().template try_as<IIconSourceOverrides>().CreateIconElementCore();
    }
    template <typename D> auto IIconSourceOverridesT<D>::GetIconElementPropertyCore(winrt::Microsoft::UI::Xaml::DependencyProperty const& iconSourceProperty) const
    {
        return shim().template try_as<IIconSourceOverrides>().GetIconElementPropertyCore(iconSourceProperty);
    }
    template <typename D> auto IItemCollectionTransitionProviderOverridesT<D>::ShouldAnimateCore(winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition const& transition) const
    {
        return shim().template try_as<IItemCollectionTransitionProviderOverrides>().ShouldAnimateCore(transition);
    }
    template <typename D> auto IItemCollectionTransitionProviderOverridesT<D>::StartTransitions(param::vector<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition> const& transitions) const
    {
        return shim().template try_as<IItemCollectionTransitionProviderOverrides>().StartTransitions(transitions);
    }
    template <typename D> auto IItemsControlOverridesT<D>::IsItemItsOwnContainerOverride(winrt::Windows::Foundation::IInspectable const& item) const
    {
        return shim().template try_as<IItemsControlOverrides>().IsItemItsOwnContainerOverride(item);
    }
    template <typename D> auto IItemsControlOverridesT<D>::GetContainerForItemOverride() const
    {
        return shim().template try_as<IItemsControlOverrides>().GetContainerForItemOverride();
    }
    template <typename D> auto IItemsControlOverridesT<D>::ClearContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item) const
    {
        return shim().template try_as<IItemsControlOverrides>().ClearContainerForItemOverride(element, item);
    }
    template <typename D> auto IItemsControlOverridesT<D>::PrepareContainerForItemOverride(winrt::Microsoft::UI::Xaml::DependencyObject const& element, winrt::Windows::Foundation::IInspectable const& item) const
    {
        return shim().template try_as<IItemsControlOverrides>().PrepareContainerForItemOverride(element, item);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnItemsChanged(winrt::Windows::Foundation::IInspectable const& e) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnItemsChanged(e);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnItemContainerStyleChanged(winrt::Microsoft::UI::Xaml::Style const& oldItemContainerStyle, winrt::Microsoft::UI::Xaml::Style const& newItemContainerStyle) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnItemContainerStyleChanged(oldItemContainerStyle, newItemContainerStyle);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnItemContainerStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& oldItemContainerStyleSelector, winrt::Microsoft::UI::Xaml::Controls::StyleSelector const& newItemContainerStyleSelector) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnItemContainerStyleSelectorChanged(oldItemContainerStyleSelector, newItemContainerStyleSelector);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnItemTemplateChanged(winrt::Microsoft::UI::Xaml::DataTemplate const& oldItemTemplate, winrt::Microsoft::UI::Xaml::DataTemplate const& newItemTemplate) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnItemTemplateChanged(oldItemTemplate, newItemTemplate);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnItemTemplateSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& oldItemTemplateSelector, winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector const& newItemTemplateSelector) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnItemTemplateSelectorChanged(oldItemTemplateSelector, newItemTemplateSelector);
    }
    template <typename D> auto IItemsControlOverridesT<D>::OnGroupStyleSelectorChanged(winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& oldGroupStyleSelector, winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector const& newGroupStyleSelector) const
    {
        return shim().template try_as<IItemsControlOverrides>().OnGroupStyleSelectorChanged(oldGroupStyleSelector, newGroupStyleSelector);
    }
    template <typename D> auto ILayoutOverridesT<D>::CreateDefaultItemTransitionProvider() const
    {
        return shim().template try_as<ILayoutOverrides>().CreateDefaultItemTransitionProvider();
    }
    template <typename D> auto ILayoutContextOverridesT<D>::LayoutStateCore() const
    {
        return shim().template try_as<ILayoutContextOverrides>().LayoutStateCore();
    }
    template <typename D> auto ILayoutContextOverridesT<D>::LayoutStateCore(winrt::Windows::Foundation::IInspectable const& value) const
    {
        return shim().template try_as<ILayoutContextOverrides>().LayoutStateCore(value);
    }
    template <typename D> auto INonVirtualizingLayoutOverridesT<D>::InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context) const
    {
        return shim().template try_as<INonVirtualizingLayoutOverrides>().InitializeForContextCore(context);
    }
    template <typename D> auto INonVirtualizingLayoutOverridesT<D>::UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context) const
    {
        return shim().template try_as<INonVirtualizingLayoutOverrides>().UninitializeForContextCore(context);
    }
    template <typename D> auto INonVirtualizingLayoutOverridesT<D>::MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize) const
    {
        return shim().template try_as<INonVirtualizingLayoutOverrides>().MeasureOverride(context, availableSize);
    }
    template <typename D> auto INonVirtualizingLayoutOverridesT<D>::ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize) const
    {
        return shim().template try_as<INonVirtualizingLayoutOverrides>().ArrangeOverride(context, finalSize);
    }
    template <typename D> auto INonVirtualizingLayoutContextOverridesT<D>::ChildrenCore() const
    {
        return shim().template try_as<INonVirtualizingLayoutContextOverrides>().ChildrenCore();
    }
    template <typename D> auto IPageOverridesT<D>::OnNavigatedFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const
    {
        return shim().template try_as<IPageOverrides>().OnNavigatedFrom(e);
    }
    template <typename D> auto IPageOverridesT<D>::OnNavigatedTo(winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const
    {
        return shim().template try_as<IPageOverrides>().OnNavigatedTo(e);
    }
    template <typename D> auto IPageOverridesT<D>::OnNavigatingFrom(winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventArgs const& e) const
    {
        return shim().template try_as<IPageOverrides>().OnNavigatingFrom(e);
    }
    template <typename D> auto IStyleSelectorOverridesT<D>::SelectStyleCore(winrt::Windows::Foundation::IInspectable const& item, winrt::Microsoft::UI::Xaml::DependencyObject const& container) const
    {
        return shim().template try_as<IStyleSelectorOverrides>().SelectStyleCore(item, container);
    }
    template <typename D> auto IToggleSwitchOverridesT<D>::OnToggled() const
    {
        return shim().template try_as<IToggleSwitchOverrides>().OnToggled();
    }
    template <typename D> auto IToggleSwitchOverridesT<D>::OnOnContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        return shim().template try_as<IToggleSwitchOverrides>().OnOnContentChanged(oldContent, newContent);
    }
    template <typename D> auto IToggleSwitchOverridesT<D>::OnOffContentChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        return shim().template try_as<IToggleSwitchOverrides>().OnOffContentChanged(oldContent, newContent);
    }
    template <typename D> auto IToggleSwitchOverridesT<D>::OnHeaderChanged(winrt::Windows::Foundation::IInspectable const& oldContent, winrt::Windows::Foundation::IInspectable const& newContent) const
    {
        return shim().template try_as<IToggleSwitchOverrides>().OnHeaderChanged(oldContent, newContent);
    }
    template <typename D> auto IVirtualizingLayoutOverridesT<D>::InitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context) const
    {
        return shim().template try_as<IVirtualizingLayoutOverrides>().InitializeForContextCore(context);
    }
    template <typename D> auto IVirtualizingLayoutOverridesT<D>::UninitializeForContextCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context) const
    {
        return shim().template try_as<IVirtualizingLayoutOverrides>().UninitializeForContextCore(context);
    }
    template <typename D> auto IVirtualizingLayoutOverridesT<D>::MeasureOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& availableSize) const
    {
        return shim().template try_as<IVirtualizingLayoutOverrides>().MeasureOverride(context, availableSize);
    }
    template <typename D> auto IVirtualizingLayoutOverridesT<D>::ArrangeOverride(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::Size const& finalSize) const
    {
        return shim().template try_as<IVirtualizingLayoutOverrides>().ArrangeOverride(context, finalSize);
    }
    template <typename D> auto IVirtualizingLayoutOverridesT<D>::OnItemsChangedCore(winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext const& context, winrt::Windows::Foundation::IInspectable const& source, winrt::Microsoft::UI::Xaml::Interop::NotifyCollectionChangedEventArgs const& args) const
    {
        return shim().template try_as<IVirtualizingLayoutOverrides>().OnItemsChangedCore(context, source, args);
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::ItemCountCore() const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().ItemCountCore();
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::GetItemAtCore(int32_t index) const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().GetItemAtCore(index);
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::RealizationRectCore() const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().RealizationRectCore();
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::GetOrCreateElementAtCore(int32_t index, winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions const& options) const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().GetOrCreateElementAtCore(index, options);
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::RecycleElementCore(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().RecycleElementCore(element);
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::RecommendedAnchorIndexCore() const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().RecommendedAnchorIndexCore();
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::LayoutOriginCore() const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().LayoutOriginCore();
    }
    template <typename D> auto IVirtualizingLayoutContextOverridesT<D>::LayoutOriginCore(winrt::Windows::Foundation::Point const& value) const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides>().LayoutOriginCore(value);
    }
    template <typename D> auto IVirtualizingLayoutContextOverrides2T<D>::VisibleRectCore() const
    {
        return shim().template try_as<IVirtualizingLayoutContextOverrides2>().VisibleRectCore();
    }
    template <typename D> auto IVirtualizingPanelOverridesT<D>::OnItemsChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs const& args) const
    {
        return shim().template try_as<IVirtualizingPanelOverrides>().OnItemsChanged(sender, args);
    }
    template <typename D> auto IVirtualizingPanelOverridesT<D>::OnClearChildren() const
    {
        return shim().template try_as<IVirtualizingPanelOverrides>().OnClearChildren();
    }
    template <typename D> auto IVirtualizingPanelOverridesT<D>::BringIndexIntoView(int32_t index) const
    {
        return shim().template try_as<IVirtualizingPanelOverrides>().BringIndexIntoView(index);
    }
    template <typename D> auto IVirtualizingStackPanelOverridesT<D>::OnCleanUpVirtualizedItem(winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs const& e) const
    {
        return shim().template try_as<IVirtualizingStackPanelOverrides>().OnCleanUpVirtualizedItem(e);
    }
    template <typename D, typename... Interfaces>
    struct AnimatedIconT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AnimatedIcon, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AnimatedIcon;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AnimatedIconT()
        {
            impl::call_factory<AnimatedIcon, IAnimatedIconFactory>([&](IAnimatedIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AnimatedIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, AnimatedIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = AnimatedIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        AnimatedIconSourceT()
        {
            impl::call_factory<AnimatedIconSource, IAnimatedIconSourceFactory>([&](IAnimatedIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AnimatedVisualPlayerT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AnimatedVisualPlayer, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AnimatedVisualPlayer;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AnimatedVisualPlayerT()
        {
            impl::call_factory<AnimatedVisualPlayer, IAnimatedVisualPlayerFactory>([&](IAnimatedVisualPlayerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AnnotatedScrollBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AnnotatedScrollBar, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AnnotatedScrollBar;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AnnotatedScrollBarT()
        {
            impl::call_factory<AnnotatedScrollBar, IAnnotatedScrollBarFactory>([&](IAnnotatedScrollBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AppBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAppBar, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AppBar, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IAppBarOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AppBar;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AppBarT()
        {
            impl::call_factory<AppBar, IAppBarFactory>([&](IAppBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AppBarButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarButton, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, winrt::Microsoft::UI::Xaml::Controls::IButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AppBarButton, winrt::Microsoft::UI::Xaml::Controls::Button, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AppBarButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AppBarButtonT()
        {
            impl::call_factory<AppBarButton, IAppBarButtonFactory>([&](IAppBarButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AppBarElementContainerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainer, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AppBarElementContainer, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AppBarElementContainer;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AppBarElementContainerT()
        {
            impl::call_factory<AppBarElementContainer, IAppBarElementContainerFactory>([&](IAppBarElementContainerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AppBarSeparatorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparator, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AppBarSeparator, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AppBarSeparator;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AppBarSeparatorT()
        {
            impl::call_factory<AppBarSeparator, IAppBarSeparatorFactory>([&](IAppBarSeparatorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct AppBarToggleButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton, winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, AppBarToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = AppBarToggleButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        AppBarToggleButtonT()
        {
            impl::call_factory<AppBarToggleButton, IAppBarToggleButtonFactory>([&](IAppBarToggleButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct BitmapIconT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, BitmapIcon, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = BitmapIcon;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        BitmapIconT()
        {
            impl::call_factory<BitmapIcon, IBitmapIconFactory>([&](IBitmapIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct BitmapIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, BitmapIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = BitmapIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        BitmapIconSourceT()
        {
            impl::call_factory<BitmapIconSource, IBitmapIconSourceFactory>([&](IBitmapIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct BreadcrumbBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, BreadcrumbBar, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = BreadcrumbBar;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        BreadcrumbBarT()
        {
            impl::call_factory<BreadcrumbBar, IBreadcrumbBarFactory>([&](IBreadcrumbBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct BreadcrumbBarItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, BreadcrumbBarItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = BreadcrumbBarItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        BreadcrumbBarItemT()
        {
            impl::call_factory<BreadcrumbBarItem, IBreadcrumbBarItemFactory>([&](IBreadcrumbBarItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Button, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Button;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ButtonT()
        {
            impl::call_factory<Button, IButtonFactory>([&](IButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CalendarDatePickerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CalendarDatePicker, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CalendarDatePicker;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CalendarDatePickerT()
        {
            impl::call_factory<CalendarDatePicker, ICalendarDatePickerFactory>([&](ICalendarDatePickerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CalendarViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarView, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CalendarView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CalendarView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CalendarViewT()
        {
            impl::call_factory<CalendarView, ICalendarViewFactory>([&](ICalendarViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CalendarViewDayItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CalendarViewDayItem, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CalendarViewDayItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CalendarViewDayItemT()
        {
            impl::call_factory<CalendarViewDayItem, ICalendarViewDayItemFactory>([&](ICalendarViewDayItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CanvasT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICanvas, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Canvas, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Canvas;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CanvasT()
        {
            impl::call_factory<Canvas, ICanvasFactory>([&](ICanvasFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CheckBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICheckBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CheckBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CheckBox;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CheckBoxT()
        {
            impl::call_factory<CheckBox, ICheckBoxFactory>([&](ICheckBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ColorPickerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IColorPicker, winrt::Microsoft::UI::Xaml::Controls::IColorPicker2, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ColorPicker, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ColorPicker;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ColorPickerT()
        {
            impl::call_factory<ColorPicker, IColorPickerFactory>([&](IColorPickerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ComboBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IComboBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ComboBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ComboBox;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ComboBoxT()
        {
            impl::call_factory<ComboBox, IComboBoxFactory>([&](IComboBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ComboBoxItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IComboBoxItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ComboBoxItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ComboBoxItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ComboBoxItemT()
        {
            impl::call_factory<ComboBoxItem, IComboBoxItemFactory>([&](IComboBoxItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CommandBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBar, winrt::Microsoft::UI::Xaml::Controls::IAppBar, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CommandBar, winrt::Microsoft::UI::Xaml::Controls::AppBar, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IAppBarOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CommandBar;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CommandBarT()
        {
            impl::call_factory<CommandBar, ICommandBarFactory>([&](ICommandBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CommandBarFlyoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, CommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = CommandBarFlyout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        CommandBarFlyoutT()
        {
            impl::call_factory<CommandBarFlyout, ICommandBarFlyoutFactory>([&](ICommandBarFlyoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CommandBarOverflowPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenter, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CommandBarOverflowPresenter, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CommandBarOverflowPresenter;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        CommandBarOverflowPresenterT()
        {
            impl::call_factory<CommandBarOverflowPresenter, ICommandBarOverflowPresenterFactory>([&](ICommandBarOverflowPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ContentControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ContentControl;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ContentControlT()
        {
            impl::call_factory<ContentControl, IContentControlFactory>([&](IContentControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ContentDialogT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IContentDialog, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ContentDialog, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ContentDialog;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ContentDialogT()
        {
            impl::call_factory<ContentDialog, IContentDialogFactory>([&](IContentDialogFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ContentPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ContentPresenter, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ContentPresenter;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ContentPresenterT()
        {
            impl::call_factory<ContentPresenter, IContentPresenterFactory>([&](IContentPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Control;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ControlT()
        {
            impl::call_factory<Control, IControlFactory>([&](IControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DataTemplateSelectorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector, winrt::Microsoft::UI::Xaml::IElementFactory>,
        impl::base<D, DataTemplateSelector>,
        winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverridesT<D>
    {
        using composable = DataTemplateSelector;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides>;
    protected:
        DataTemplateSelectorT()
        {
            impl::call_factory<DataTemplateSelector, IDataTemplateSelectorFactory>([&](IDataTemplateSelectorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DatePickerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IDatePicker, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, DatePicker, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = DatePicker;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        DatePickerT()
        {
            impl::call_factory<DatePicker, IDatePickerFactory>([&](IDatePickerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DropDownButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IDropDownButton, winrt::Microsoft::UI::Xaml::Controls::IButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, DropDownButton, winrt::Microsoft::UI::Xaml::Controls::Button, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = DropDownButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        DropDownButtonT()
        {
            impl::call_factory<DropDownButton, IDropDownButtonFactory>([&](IDropDownButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ExpanderT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IExpander, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Expander, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Expander;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ExpanderT()
        {
            impl::call_factory<Expander, IExpanderFactory>([&](IExpanderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlipViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFlipView, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, FlipView, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = FlipView;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        FlipViewT()
        {
            impl::call_factory<FlipView, IFlipViewFactory>([&](IFlipViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlipViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFlipViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, FlipViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = FlipViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        FlipViewItemT()
        {
            impl::call_factory<FlipViewItem, IFlipViewItemFactory>([&](IFlipViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlyoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, Flyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = Flyout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        FlyoutT()
        {
            impl::call_factory<Flyout, IFlyoutFactory>([&](IFlyoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlyoutPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, FlyoutPresenter, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = FlyoutPresenter;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        FlyoutPresenterT()
        {
            impl::call_factory<FlyoutPresenter, IFlyoutPresenterFactory>([&](IFlyoutPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FontIconT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFontIcon, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, FontIcon, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = FontIcon;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        FontIconT()
        {
            impl::call_factory<FontIcon, IFontIconFactory>([&](IFontIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FontIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFontIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, FontIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = FontIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        FontIconSourceT()
        {
            impl::call_factory<FontIconSource, IFontIconSourceFactory>([&](IFontIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FrameT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IFrame, winrt::Microsoft::UI::Xaml::Controls::INavigate, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Frame, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Frame;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        FrameT()
        {
            impl::call_factory<Frame, IFrameFactory>([&](IFrameFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IFrame>::Navigate;
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::INavigate>::Navigate;
    };
    template <typename D, typename... Interfaces>
    struct GridT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGrid, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Grid, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Grid;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        GridT()
        {
            impl::call_factory<Grid, IGridFactory>([&](IGridFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GridViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGridView, winrt::Microsoft::UI::Xaml::Controls::IListViewBase, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, GridView, winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = GridView;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        GridViewT()
        {
            impl::call_factory<GridView, IGridViewFactory>([&](IGridViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GridViewHeaderItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItem, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, GridViewHeaderItem, winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = GridViewHeaderItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        GridViewHeaderItemT()
        {
            impl::call_factory<GridViewHeaderItem, IGridViewHeaderItemFactory>([&](IGridViewHeaderItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GridViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGridViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, GridViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = GridViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        GridViewItemT()
        {
            impl::call_factory<GridViewItem, IGridViewItemFactory>([&](IGridViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GroupItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGroupItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, GroupItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = GroupItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        GroupItemT()
        {
            impl::call_factory<GroupItem, IGroupItemFactory>([&](IGroupItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GroupStyleT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyle, winrt::Microsoft::UI::Xaml::Data::INotifyPropertyChanged>,
        impl::base<D, GroupStyle>
    {
        using composable = GroupStyle;
    protected:
        GroupStyleT()
        {
            impl::call_factory<GroupStyle, IGroupStyleFactory>([&](IGroupStyleFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GroupStyleSelectorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector>,
        impl::base<D, GroupStyleSelector>,
        winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverridesT<D>
    {
        using composable = GroupStyleSelector;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides>;
    protected:
        GroupStyleSelectorT()
        {
            impl::call_factory<GroupStyleSelector, IGroupStyleSelectorFactory>([&](IGroupStyleSelectorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct HubT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IHub, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Hub, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Hub;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        HubT()
        {
            impl::call_factory<Hub, IHubFactory>([&](IHubFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct HubSectionT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IHubSection, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, HubSection, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = HubSection;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        HubSectionT()
        {
            impl::call_factory<HubSection, IHubSectionFactory>([&](IHubSectionFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct HyperlinkButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, HyperlinkButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = HyperlinkButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        HyperlinkButtonT()
        {
            impl::call_factory<HyperlinkButton, IHyperlinkButtonFactory>([&](IHyperlinkButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct IconSourceElementT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, IconSourceElement, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = IconSourceElement;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        IconSourceElementT()
        {
            impl::call_factory<IconSourceElement, IIconSourceElementFactory>([&](IIconSourceElementFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ImageIconT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IImageIcon, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ImageIcon, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ImageIcon;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ImageIconT()
        {
            impl::call_factory<ImageIcon, IImageIconFactory>([&](IImageIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ImageIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IImageIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, ImageIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = ImageIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        ImageIconSourceT()
        {
            impl::call_factory<ImageIconSource, IImageIconSourceFactory>([&](IImageIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct InfoBadgeT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadge, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, InfoBadge, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = InfoBadge;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        InfoBadgeT()
        {
            impl::call_factory<InfoBadge, IInfoBadgeFactory>([&](IInfoBadgeFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct InfoBadgeTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, InfoBadgeTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = InfoBadgeTemplateSettings;
    protected:
        InfoBadgeTemplateSettingsT()
        {
            impl::call_factory<InfoBadgeTemplateSettings, IInfoBadgeTemplateSettingsFactory>([&](IInfoBadgeTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct InfoBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBar, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, InfoBar, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = InfoBar;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        InfoBarT()
        {
            impl::call_factory<InfoBar, IInfoBarFactory>([&](IInfoBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct InfoBarTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, InfoBarTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = InfoBarTemplateSettings;
    protected:
        InfoBarTemplateSettingsT()
        {
            impl::call_factory<InfoBarTemplateSettings, IInfoBarTemplateSettingsFactory>([&](IInfoBarTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemCollectionTransitionProviderT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>,
        impl::base<D, ItemCollectionTransitionProvider>,
        winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverridesT<D>
    {
        using composable = ItemCollectionTransitionProvider;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>;
    protected:
        ItemCollectionTransitionProviderT()
        {
            impl::call_factory<ItemCollectionTransitionProvider, IItemCollectionTransitionProviderFactory>([&](IItemCollectionTransitionProviderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemContainerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemContainer, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ItemContainer, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ItemContainer;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ItemContainerT()
        {
            impl::call_factory<ItemContainer, IItemContainerFactory>([&](IItemContainerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemsControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ItemsControl;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ItemsControlT()
        {
            impl::call_factory<ItemsControl, IItemsControlFactory>([&](IItemsControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemsRepeaterT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater, winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ItemsRepeater, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ItemsRepeater;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ItemsRepeaterT()
        {
            impl::call_factory<ItemsRepeater, IItemsRepeaterFactory>([&](IItemsRepeaterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemsSourceViewT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView, winrt::Microsoft::UI::Xaml::Interop::INotifyCollectionChanged>,
        impl::base<D, ItemsSourceView>
    {
        using composable = ItemsSourceView;
    protected:
        ItemsSourceViewT(winrt::Windows::Foundation::IInspectable const& source)
        {
            impl::call_factory<ItemsSourceView, IItemsSourceViewFactory>([&](IItemsSourceViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(source, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemsViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemsView, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ItemsView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ItemsView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ItemsViewT()
        {
            impl::call_factory<ItemsView, IItemsViewFactory>([&](IItemsViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ItemsWrapGridT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ItemsWrapGrid, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ItemsWrapGrid;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ItemsWrapGridT()
        {
            impl::call_factory<ItemsWrapGrid, IItemsWrapGridFactory>([&](IItemsWrapGridFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct LinedFlowLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::ILayout, winrt::Microsoft::UI::Xaml::Controls::ILayout2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>,
        impl::base<D, LinedFlowLayout, winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverridesT<D>
    {
        using composable = LinedFlowLayout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>;
    protected:
        LinedFlowLayoutT()
        {
            impl::call_factory<LinedFlowLayout, ILinedFlowLayoutFactory>([&](ILinedFlowLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct LinedFlowLayoutItemCollectionTransitionProviderT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProvider, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider>,
        impl::base<D, LinedFlowLayoutItemCollectionTransitionProvider, winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider>,
        winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverridesT<D>
    {
        using composable = LinedFlowLayoutItemCollectionTransitionProvider;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides>;
    protected:
        LinedFlowLayoutItemCollectionTransitionProviderT()
        {
            impl::call_factory<LinedFlowLayoutItemCollectionTransitionProvider, ILinedFlowLayoutItemCollectionTransitionProviderFactory>([&](ILinedFlowLayoutItemCollectionTransitionProviderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListBox, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListBox;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListBoxT()
        {
            impl::call_factory<ListBox, IListBoxFactory>([&](IListBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListBoxItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListBoxItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListBoxItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListBoxItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListBoxItemT()
        {
            impl::call_factory<ListBoxItem, IListBoxItemFactory>([&](IListBoxItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListView, winrt::Microsoft::UI::Xaml::Controls::IListViewBase, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListView, winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListView;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListViewT()
        {
            impl::call_factory<ListView, IListViewFactory>([&](IListViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListViewBaseT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListViewBase, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListViewBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListViewBase;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListViewBaseT()
        {
            impl::call_factory<ListViewBase, IListViewBaseFactory>([&](IListViewBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListViewHeaderItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItem, winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListViewHeaderItem, winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListViewHeaderItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListViewHeaderItemT()
        {
            impl::call_factory<ListViewHeaderItem, IListViewHeaderItemFactory>([&](IListViewHeaderItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ListViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ListViewItemT()
        {
            impl::call_factory<ListViewItem, IListViewItemFactory>([&](IListViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MapControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMapControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MapControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MapControl;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MapControlT()
        {
            impl::call_factory<MapControl, IMapControlFactory>([&](IMapControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MapElementsLayerT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer, winrt::Microsoft::UI::Xaml::Controls::IMapLayer, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, MapElementsLayer, winrt::Microsoft::UI::Xaml::Controls::MapLayer, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = MapElementsLayer;
    protected:
        MapElementsLayerT()
        {
            impl::call_factory<MapElementsLayer, IMapElementsLayerFactory>([&](IMapElementsLayerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MapIconT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMapIcon, winrt::Microsoft::UI::Xaml::Controls::IMapElement, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, MapIcon, winrt::Microsoft::UI::Xaml::Controls::MapElement, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = MapIcon;
    protected:
        MapIconT()
        {
            impl::call_factory<MapIcon, IMapIconFactory>([&](IMapIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MediaPlayerElementT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MediaPlayerElement, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MediaPlayerElement;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MediaPlayerElementT()
        {
            impl::call_factory<MediaPlayerElement, IMediaPlayerElementFactory>([&](IMediaPlayerElementFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MediaPlayerPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MediaPlayerPresenter, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MediaPlayerPresenter;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MediaPlayerPresenterT()
        {
            impl::call_factory<MediaPlayerPresenter, IMediaPlayerPresenterFactory>([&](IMediaPlayerPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MediaTransportControlsT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MediaTransportControls, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MediaTransportControls;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MediaTransportControlsT()
        {
            impl::call_factory<MediaTransportControls, IMediaTransportControlsFactory>([&](IMediaTransportControlsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MenuBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBar, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MenuBar, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MenuBar;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MenuBarT()
        {
            impl::call_factory<MenuBar, IMenuBarFactory>([&](IMenuBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MenuBarItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MenuBarItem, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MenuBarItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MenuBarItemT()
        {
            impl::call_factory<MenuBarItem, IMenuBarItemFactory>([&](IMenuBarItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MenuBarItemFlyoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyout, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, MenuBarItemFlyout, winrt::Microsoft::UI::Xaml::Controls::MenuFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = MenuBarItemFlyout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        MenuBarItemFlyoutT()
        {
            impl::call_factory<MenuBarItemFlyout, IMenuBarItemFlyoutFactory>([&](IMenuBarItemFlyoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>::ShowAt;
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>::ShowAt;
    };
    template <typename D, typename... Interfaces>
    struct MenuFlyoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, MenuFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = MenuFlyout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        MenuFlyoutT()
        {
            impl::call_factory<MenuFlyout, IMenuFlyoutFactory>([&](IMenuFlyoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout>::ShowAt;
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>::ShowAt;
    };
    template <typename D, typename... Interfaces>
    struct MenuFlyoutItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MenuFlyoutItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MenuFlyoutItemT()
        {
            impl::call_factory<MenuFlyoutItem, IMenuFlyoutItemFactory>([&](IMenuFlyoutItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MenuFlyoutPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MenuFlyoutPresenter, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MenuFlyoutPresenter;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MenuFlyoutPresenterT()
        {
            impl::call_factory<MenuFlyoutPresenter, IMenuFlyoutPresenterFactory>([&](IMenuFlyoutPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MenuFlyoutSeparatorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparator, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, MenuFlyoutSeparator, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = MenuFlyoutSeparator;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        MenuFlyoutSeparatorT()
        {
            impl::call_factory<MenuFlyoutSeparator, IMenuFlyoutSeparatorFactory>([&](IMenuFlyoutSeparatorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INavigationView, winrt::Microsoft::UI::Xaml::Controls::INavigationView2, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, NavigationView, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = NavigationView;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        NavigationViewT()
        {
            impl::call_factory<NavigationView, INavigationViewFactory>([&](INavigationViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, NavigationViewItem, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = NavigationViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        NavigationViewItemT()
        {
            impl::call_factory<NavigationViewItem, INavigationViewItemFactory>([&](INavigationViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewItemHeaderT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeader, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, NavigationViewItemHeader, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = NavigationViewItemHeader;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        NavigationViewItemHeaderT()
        {
            impl::call_factory<NavigationViewItemHeader, INavigationViewItemHeaderFactory>([&](INavigationViewItemHeaderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewItemSeparatorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparator, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, NavigationViewItemSeparator, winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = NavigationViewItemSeparator;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        NavigationViewItemSeparatorT()
        {
            impl::call_factory<NavigationViewItemSeparator, INavigationViewItemSeparatorFactory>([&](INavigationViewItemSeparatorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings, winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, NavigationViewTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = NavigationViewTemplateSettings;
    protected:
        NavigationViewTemplateSettingsT()
        {
            impl::call_factory<NavigationViewTemplateSettings, INavigationViewTemplateSettingsFactory>([&](INavigationViewTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NonVirtualizingLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::ILayout, winrt::Microsoft::UI::Xaml::Controls::ILayout2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>,
        impl::base<D, NonVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverridesT<D>
    {
        using composable = NonVirtualizingLayout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>;
    protected:
        NonVirtualizingLayoutT()
        {
            impl::call_factory<NonVirtualizingLayout, INonVirtualizingLayoutFactory>([&](INonVirtualizingLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NonVirtualizingLayoutContextT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, NonVirtualizingLayoutContext, winrt::Microsoft::UI::Xaml::Controls::LayoutContext, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverridesT<D>
    {
        using composable = NonVirtualizingLayoutContext;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>;
    protected:
        NonVirtualizingLayoutContextT()
        {
            impl::call_factory<NonVirtualizingLayoutContext, INonVirtualizingLayoutContextFactory>([&](INonVirtualizingLayoutContextFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NumberBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::INumberBox, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, NumberBox, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = NumberBox;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        NumberBoxT()
        {
            impl::call_factory<NumberBox, INumberBoxFactory>([&](INumberBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PageT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPage, winrt::Microsoft::UI::Xaml::Controls::IUserControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Page, winrt::Microsoft::UI::Xaml::Controls::UserControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IPageOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Page;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IPageOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PageT()
        {
            impl::call_factory<Page, IPageFactory>([&](IPageFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Panel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PanelT()
        {
            impl::call_factory<Panel, IPanelFactory>([&](IPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ParallaxViewT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IParallaxView, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ParallaxView, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ParallaxView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ParallaxViewT()
        {
            impl::call_factory<ParallaxView, IParallaxViewFactory>([&](IParallaxViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PathIconT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPathIcon, winrt::Microsoft::UI::Xaml::Controls::IIconElement, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, PathIcon, winrt::Microsoft::UI::Xaml::Controls::IconElement, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = PathIcon;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PathIconT()
        {
            impl::call_factory<PathIcon, IPathIconFactory>([&](IPathIconFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PathIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPathIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, PathIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = PathIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        PathIconSourceT()
        {
            impl::call_factory<PathIconSource, IPathIconSourceFactory>([&](IPathIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PersonPictureT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPersonPicture, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, PersonPicture, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = PersonPicture;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PersonPictureT()
        {
            impl::call_factory<PersonPicture, IPersonPictureFactory>([&](IPersonPictureFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PipsPagerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPipsPager, winrt::Microsoft::UI::Xaml::Controls::IPipsPager2, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, PipsPager, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = PipsPager;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PipsPagerT()
        {
            impl::call_factory<PipsPager, IPipsPagerFactory>([&](IPipsPagerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PivotT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPivot, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Pivot, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Pivot;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PivotT()
        {
            impl::call_factory<Pivot, IPivotFactory>([&](IPivotFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PivotItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IPivotItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, PivotItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = PivotItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        PivotItemT()
        {
            impl::call_factory<PivotItem, IPivotItemFactory>([&](IPivotItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ProgressBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IProgressBar, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ProgressBar, winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ProgressBar;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ProgressBarT()
        {
            impl::call_factory<ProgressBar, IProgressBarFactory>([&](IProgressBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ProgressRingT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IProgressRing, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ProgressRing, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ProgressRing;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ProgressRingT()
        {
            impl::call_factory<ProgressRing, IProgressRingFactory>([&](IProgressRingFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RadioButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RadioButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleButton, winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RadioButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RadioButtonT()
        {
            impl::call_factory<RadioButton, IRadioButtonFactory>([&](IRadioButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RadioButtonsT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRadioButtons, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RadioButtons, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RadioButtons;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RadioButtonsT()
        {
            impl::call_factory<RadioButtons, IRadioButtonsFactory>([&](IRadioButtonsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RadioMenuFlyoutItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RadioMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RadioMenuFlyoutItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RadioMenuFlyoutItemT()
        {
            impl::call_factory<RadioMenuFlyoutItem, IRadioMenuFlyoutItemFactory>([&](IRadioMenuFlyoutItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RatingControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRatingControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RatingControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RatingControl;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RatingControlT()
        {
            impl::call_factory<RatingControl, IRatingControlFactory>([&](IRatingControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RatingItemFontInfoT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, RatingItemFontInfo, winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = RatingItemFontInfo;
    protected:
        RatingItemFontInfoT()
        {
            impl::call_factory<RatingItemFontInfo, IRatingItemFontInfoFactory>([&](IRatingItemFontInfoFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RatingItemImageInfoT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, RatingItemImageInfo, winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = RatingItemImageInfo;
    protected:
        RatingItemImageInfoT()
        {
            impl::call_factory<RatingItemImageInfo, IRatingItemImageInfoFactory>([&](IRatingItemImageInfoFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RatingItemInfoT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, RatingItemInfo, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = RatingItemInfo;
    protected:
        RatingItemInfoT()
        {
            impl::call_factory<RatingItemInfo, IRatingItemInfoFactory>([&](IRatingItemInfoFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RefreshContainerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RefreshContainer, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RefreshContainer;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RefreshContainerT()
        {
            impl::call_factory<RefreshContainer, IRefreshContainerFactory>([&](IRefreshContainerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RefreshVisualizerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RefreshVisualizer, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RefreshVisualizer;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RefreshVisualizerT()
        {
            impl::call_factory<RefreshVisualizer, IRefreshVisualizerFactory>([&](IRefreshVisualizerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RelativePanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRelativePanel, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RelativePanel, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RelativePanel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RelativePanelT()
        {
            impl::call_factory<RelativePanel, IRelativePanelFactory>([&](IRelativePanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RevealListViewItemPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenter, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, winrt::Microsoft::UI::Xaml::Controls::IContentPresenter, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RevealListViewItemPresenter, winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenter, winrt::Microsoft::UI::Xaml::Controls::ContentPresenter, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RevealListViewItemPresenter;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RevealListViewItemPresenterT()
        {
            impl::call_factory<RevealListViewItemPresenter, IRevealListViewItemPresenterFactory>([&](IRevealListViewItemPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RichEditBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IRichEditBox, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, RichEditBox, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = RichEditBox;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        RichEditBoxT()
        {
            impl::call_factory<RichEditBox, IRichEditBoxFactory>([&](IRichEditBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ScrollViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IScrollView, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ScrollView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ScrollView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ScrollViewT()
        {
            impl::call_factory<ScrollView, IScrollViewFactory>([&](IScrollViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ScrollingScrollOptionsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions>,
        impl::base<D, ScrollingScrollOptions>
    {
        using composable = ScrollingScrollOptions;
    protected:
        ScrollingScrollOptionsT(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode)
        {
            impl::call_factory<ScrollingScrollOptions, IScrollingScrollOptionsFactory>([&](IScrollingScrollOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(animationMode, *this, this->m_inner); });
        }
        ScrollingScrollOptionsT(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode)
        {
            impl::call_factory<ScrollingScrollOptions, IScrollingScrollOptionsFactory>([&](IScrollingScrollOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance2(animationMode, snapPointsMode, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ScrollingZoomOptionsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions>,
        impl::base<D, ScrollingZoomOptions>
    {
        using composable = ScrollingZoomOptions;
    protected:
        ScrollingZoomOptionsT(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode)
        {
            impl::call_factory<ScrollingZoomOptions, IScrollingZoomOptionsFactory>([&](IScrollingZoomOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(animationMode, *this, this->m_inner); });
        }
        ScrollingZoomOptionsT(winrt::Microsoft::UI::Xaml::Controls::ScrollingAnimationMode const& animationMode, winrt::Microsoft::UI::Xaml::Controls::ScrollingSnapPointsMode const& snapPointsMode)
        {
            impl::call_factory<ScrollingZoomOptions, IScrollingZoomOptionsFactory>([&](IScrollingZoomOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance2(animationMode, snapPointsMode, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SelectionChangedEventArgsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs, winrt::Microsoft::UI::Xaml::IRoutedEventArgs>,
        impl::base<D, SelectionChangedEventArgs, winrt::Microsoft::UI::Xaml::RoutedEventArgs>
    {
        using composable = SelectionChangedEventArgs;
    protected:
        SelectionChangedEventArgsT(param::vector<winrt::Windows::Foundation::IInspectable> const& removedItems, param::vector<winrt::Windows::Foundation::IInspectable> const& addedItems)
        {
            impl::call_factory<SelectionChangedEventArgs, ISelectionChangedEventArgsFactory>([&](ISelectionChangedEventArgsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithRemovedItemsAndAddedItems(removedItems, addedItems, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SelectorBarT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBar, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SelectorBar, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SelectorBar;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SelectorBarT()
        {
            impl::call_factory<SelectorBar, ISelectorBarFactory>([&](ISelectorBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SelectorBarItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem, winrt::Microsoft::UI::Xaml::Controls::IItemContainer, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SelectorBarItem, winrt::Microsoft::UI::Xaml::Controls::ItemContainer, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SelectorBarItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SelectorBarItemT()
        {
            impl::call_factory<SelectorBarItem, ISelectorBarItemFactory>([&](ISelectorBarItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SliderT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISlider, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, Slider, winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = Slider;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SliderT()
        {
            impl::call_factory<Slider, ISliderFactory>([&](ISliderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SplitButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISplitButton, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SplitButton, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SplitButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SplitButtonT()
        {
            impl::call_factory<SplitButton, ISplitButtonFactory>([&](ISplitButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SplitViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISplitView, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SplitView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SplitView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SplitViewT()
        {
            impl::call_factory<SplitView, ISplitViewFactory>([&](ISplitViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct StackLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IStackLayout, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::ILayout, winrt::Microsoft::UI::Xaml::Controls::ILayout2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>,
        impl::base<D, StackLayout, winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverridesT<D>
    {
        using composable = StackLayout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>;
    protected:
        StackLayoutT()
        {
            impl::call_factory<StackLayout, IStackLayoutFactory>([&](IStackLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct StackPanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IStackPanel, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, StackPanel, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = StackPanel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        StackPanelT()
        {
            impl::call_factory<StackPanel, IStackPanelFactory>([&](IStackPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct StyleSelectorT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelector>,
        impl::base<D, StyleSelector>,
        winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverridesT<D>
    {
        using composable = StyleSelector;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides>;
    protected:
        StyleSelectorT()
        {
            impl::call_factory<StyleSelector, IStyleSelectorFactory>([&](IStyleSelectorFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SwapChainBackgroundPanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel, winrt::Microsoft::UI::Xaml::Controls::IGrid, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SwapChainBackgroundPanel, winrt::Microsoft::UI::Xaml::Controls::Grid, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SwapChainBackgroundPanel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SwapChainBackgroundPanelT()
        {
            impl::call_factory<SwapChainBackgroundPanel, ISwapChainBackgroundPanelFactory>([&](ISwapChainBackgroundPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SwapChainPanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel, winrt::Microsoft::UI::Xaml::Controls::IGrid, winrt::Microsoft::UI::Xaml::Controls::IPanel, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SwapChainPanel, winrt::Microsoft::UI::Xaml::Controls::Grid, winrt::Microsoft::UI::Xaml::Controls::Panel, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SwapChainPanel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SwapChainPanelT()
        {
            impl::call_factory<SwapChainPanel, ISwapChainPanelFactory>([&](ISwapChainPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SwipeControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeControl, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, SwipeControl, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = SwipeControl;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        SwipeControlT()
        {
            impl::call_factory<SwipeControl, ISwipeControlFactory>([&](ISwipeControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SwipeItemT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItem, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, SwipeItem, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = SwipeItem;
    protected:
        SwipeItemT()
        {
            impl::call_factory<SwipeItem, ISwipeItemFactory>([&](ISwipeItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SwipeItemsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISwipeItems, winrt::Windows::Foundation::Collections::IIterable<winrt::Microsoft::UI::Xaml::Controls::SwipeItem>, winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::SwipeItem>, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, SwipeItems, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = SwipeItems;
    protected:
        SwipeItemsT()
        {
            impl::call_factory<SwipeItems, ISwipeItemsFactory>([&](ISwipeItemsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SymbolIconSourceT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource, winrt::Microsoft::UI::Xaml::Controls::IIconSource, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, SymbolIconSource, winrt::Microsoft::UI::Xaml::Controls::IconSource, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverridesT<D>
    {
        using composable = SymbolIconSource;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides>;
    protected:
        SymbolIconSourceT()
        {
            impl::call_factory<SymbolIconSource, ISymbolIconSourceFactory>([&](ISymbolIconSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TabViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITabView, winrt::Microsoft::UI::Xaml::Controls::ITabView2, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TabView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TabView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TabViewT()
        {
            impl::call_factory<TabView, ITabViewFactory>([&](ITabViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TabViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItem, winrt::Microsoft::UI::Xaml::Controls::IListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TabViewItem, winrt::Microsoft::UI::Xaml::Controls::ListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TabViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TabViewItemT()
        {
            impl::call_factory<TabViewItem, ITabViewItemFactory>([&](ITabViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TabViewItemTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings, winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, TabViewItemTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = TabViewItemTemplateSettings;
    protected:
        TabViewItemTemplateSettingsT()
        {
            impl::call_factory<TabViewItemTemplateSettings, ITabViewItemTemplateSettingsFactory>([&](ITabViewItemTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TeachingTipT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTip, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TeachingTip, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TeachingTip;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TeachingTipT()
        {
            impl::call_factory<TeachingTip, ITeachingTipFactory>([&](ITeachingTipFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TeachingTipTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, TeachingTipTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = TeachingTipTemplateSettings;
    protected:
        TeachingTipTemplateSettingsT()
        {
            impl::call_factory<TeachingTipTemplateSettings, ITeachingTipTemplateSettingsFactory>([&](ITeachingTipTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TextBoxT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITextBox, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TextBox, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TextBox;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TextBoxT()
        {
            impl::call_factory<TextBox, ITextBoxFactory>([&](ITextBoxFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TextCommandBarFlyoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, TextCommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = TextCommandBarFlyout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        TextCommandBarFlyoutT()
        {
            impl::call_factory<TextCommandBarFlyout, ITextCommandBarFlyoutFactory>([&](ITextCommandBarFlyoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TimePickerT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITimePicker, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TimePicker, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TimePicker;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TimePickerT()
        {
            impl::call_factory<TimePicker, ITimePickerFactory>([&](ITimePickerFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ToggleMenuFlyoutItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ToggleMenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItem, winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ToggleMenuFlyoutItem;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ToggleMenuFlyoutItemT()
        {
            impl::call_factory<ToggleMenuFlyoutItem, IToggleMenuFlyoutItemFactory>([&](IToggleMenuFlyoutItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ToggleSplitButtonT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton, winrt::Microsoft::UI::Xaml::Controls::ISplitButton, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ToggleSplitButton, winrt::Microsoft::UI::Xaml::Controls::SplitButton, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ToggleSplitButton;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ToggleSplitButtonT()
        {
            impl::call_factory<ToggleSplitButton, IToggleSplitButtonFactory>([&](IToggleSplitButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ToolTipT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IToolTip, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, ToolTip, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = ToolTip;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        ToolTipT()
        {
            impl::call_factory<ToolTip, IToolTipFactory>([&](IToolTipFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TreeViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITreeView, winrt::Microsoft::UI::Xaml::Controls::ITreeView2, winrt::Microsoft::UI::Xaml::Controls::ITreeView3, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TreeView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TreeView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TreeViewT()
        {
            impl::call_factory<TreeView, ITreeViewFactory>([&](ITreeViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TreeViewItemT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2, winrt::Microsoft::UI::Xaml::Controls::IListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, winrt::Microsoft::UI::Xaml::Controls::IContentControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TreeViewItem, winrt::Microsoft::UI::Xaml::Controls::ListViewItem, winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem, winrt::Microsoft::UI::Xaml::Controls::ContentControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IContentControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TreeViewItem;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TreeViewItemT()
        {
            impl::call_factory<TreeViewItem, ITreeViewItemFactory>([&](ITreeViewItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TreeViewItemTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, TreeViewItemTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = TreeViewItemTemplateSettings;
    protected:
        TreeViewItemTemplateSettingsT()
        {
            impl::call_factory<TreeViewItemTemplateSettings, ITreeViewItemTemplateSettingsFactory>([&](ITreeViewItemTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TreeViewListT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewList, winrt::Microsoft::UI::Xaml::Controls::IListView, winrt::Microsoft::UI::Xaml::Controls::IListViewBase, winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, winrt::Microsoft::UI::Xaml::Controls::IItemsControl, winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TreeViewList, winrt::Microsoft::UI::Xaml::Controls::ListView, winrt::Microsoft::UI::Xaml::Controls::ListViewBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector, winrt::Microsoft::UI::Xaml::Controls::ItemsControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TreeViewList;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TreeViewListT()
        {
            impl::call_factory<TreeViewList, ITreeViewListFactory>([&](ITreeViewListFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TreeViewNodeT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, TreeViewNode, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = TreeViewNode;
    protected:
        TreeViewNodeT()
        {
            impl::call_factory<TreeViewNode, ITreeViewNodeFactory>([&](ITreeViewNodeFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TwoPaneViewT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, TwoPaneView, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = TwoPaneView;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        TwoPaneViewT()
        {
            impl::call_factory<TwoPaneView, ITwoPaneViewFactory>([&](ITwoPaneViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct UniformGridLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::ILayout, winrt::Microsoft::UI::Xaml::Controls::ILayout2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>,
        impl::base<D, UniformGridLayout, winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverridesT<D>
    {
        using composable = UniformGridLayout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>;
    protected:
        UniformGridLayoutT()
        {
            impl::call_factory<UniformGridLayout, IUniformGridLayoutFactory>([&](IUniformGridLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct UserControlT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IUserControl, winrt::Microsoft::UI::Xaml::Controls::IControl, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, UserControl, winrt::Microsoft::UI::Xaml::Controls::Control, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IControlOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = UserControl;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IControlProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IControlOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        UserControlT()
        {
            impl::call_factory<UserControl, IUserControlFactory>([&](IUserControlFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct VirtualizingLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::ILayout, winrt::Microsoft::UI::Xaml::Controls::ILayout2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>,
        impl::base<D, VirtualizingLayout, winrt::Microsoft::UI::Xaml::Controls::Layout, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverridesT<D>
    {
        using composable = VirtualizingLayout;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides>;
    protected:
        VirtualizingLayoutT()
        {
            impl::call_factory<VirtualizingLayout, IVirtualizingLayoutFactory>([&](IVirtualizingLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct VirtualizingLayoutContextT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2, winrt::Microsoft::UI::Xaml::Controls::ILayoutContext, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, VirtualizingLayoutContext, winrt::Microsoft::UI::Xaml::Controls::LayoutContext, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2T<D>, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverridesT<D>
    {
        using composable = VirtualizingLayoutContext;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides>;
    protected:
        VirtualizingLayoutContextT()
        {
            impl::call_factory<VirtualizingLayoutContext, IVirtualizingLayoutContextFactory>([&](IVirtualizingLayoutContextFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct WebView2T :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2, winrt::Microsoft::UI::Xaml::Controls::IWebView22, winrt::Microsoft::UI::Xaml::IFrameworkElement, winrt::Microsoft::UI::Xaml::IUIElement, winrt::Microsoft::UI::Composition::IAnimationObject, winrt::Microsoft::UI::Composition::IVisualElement, winrt::Microsoft::UI::Composition::IVisualElement2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        protected impl::require<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, WebView2, winrt::Microsoft::UI::Xaml::FrameworkElement, winrt::Microsoft::UI::Xaml::UIElement, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = WebView2;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides>;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::IUIElementProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::IUIElementOverrides>;
    protected:
        WebView2T()
        {
            impl::call_factory<WebView2, IWebView2Factory>([&](IWebView2Factory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IWebView2>::EnsureCoreWebView2Async;
        using impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IWebView22>::EnsureCoreWebView2Async;
    };
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnchorRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayer2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualPlayerStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarDetailLabelRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarLabelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarScrollingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAnnotatedScrollBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarElementContainerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarSeparatorStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAppBarToggleButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxQuerySubmittedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxSuggestionChosenEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IAutoSuggestBoxTextChangedEventArgsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBitmapIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBorder> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBorderStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemClickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IBreadcrumbBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerDateChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarDatePickerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewDayItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewSelectedDatesChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICalendarViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICandidateWindowBoundsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICanvas> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICanvasFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICanvasStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICheckBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICheckBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IChoosingGroupHeaderContainerEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IChoosingItemContainerEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICleanUpVirtualizedItemEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorPicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorPicker2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorPickerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColorPickerStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IColumnDefinitionStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IComboBoxTextSubmittedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyout2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarFlyoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarOverflowPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICommandBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContainerContentChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentControlOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialog> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickDeferral> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogButtonClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingDeferral> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogOpenedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentDialogStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContentPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IContextMenuEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControlOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControlProtected> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IControlTemplate> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ICoreWebView2InitializedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDataTemplateSelectorOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerSelectedValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDatePickerValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDragItemsCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDragItemsStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDropDownButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDropDownButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDynamicAnimatedVisualSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IDynamicOverflowItemsChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpander> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpanderCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpanderExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpanderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpanderStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IExpanderTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlipView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlipViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlipViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlipViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlipViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyoutPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFocusDisengagedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFocusEngagedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFontIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFrame> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFrameFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IFrameStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridViewHeaderItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGridViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupStyle> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IGroupStyleSelectorOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHasValidationErrorsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHub> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubSection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubSectionFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubSectionHeaderClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubSectionStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHubStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IHyperlinkButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconElementFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconElementStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceElementStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImage> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IImageStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadge> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBadgeTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarClosingEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInfoBarTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IInsertionPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IIsTextTrimmedChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProgress> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProvider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemCollectionTransitionProviderOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemContainerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemContainerGenerator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemContainerMapping> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemContainerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsControlOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsPanelTemplate> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsPickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeater2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementClearingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementIndexChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterElementPreparedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterScrollHost> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsRepeaterStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsSourceViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsStackPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IItemsWrapGridStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IKeyIndexMapping> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayout2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutContextOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILayoutProtected2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProvider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemCollectionTransitionProviderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutItemsInfoRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ILinedFlowLayoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListBoxItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListBoxItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListPickerFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseHeaderItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewHeaderItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IListViewPersistenceHelperStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapControlMapServiceErrorOccurredEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElementClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElementFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapElementsLayerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapLayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMapLayerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerElementStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaPlayerPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControls> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsHelperStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMediaTransportControlsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemFlyoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenter2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutPresenterStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSeparatorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IMenuFlyoutSubItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigate> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationView2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewBackRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewDisplayModeChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItem3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBase2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeader> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemHeaderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemInvokedEventArgs2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemSeparatorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewItemStatics3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewPaneClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewSelectionChangedEventArgs2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettings2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INavigationViewTemplateSettingsStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutContextOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INumberBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INumberBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INumberBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::INumberBoxValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPage> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPageFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPageOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPageStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IParallaxView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IParallaxViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPasswordBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxPasswordChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPasswordBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPathIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPersonPicture> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPersonPictureTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPickerConfirmedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPickerFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPager> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPager2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerSelectedIndexChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPipsPagerTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivot> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotItemEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IPivotStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressRing> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressRingFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressRingStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IProgressRingTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButtons> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioButtonsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRadioMenuFlyoutItemStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfoStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemImageInfoStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRatingItemInfoFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshContainerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshInteractionRatioChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshStateChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRefreshVisualizerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRelativePanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRelativePanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRevealListViewItemPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichEditBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxSelectionChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichEditBoxTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlock> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflow> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockOverflowStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRichTextBlockStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRowDefinition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IRowDefinitionStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollContentPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollViewerViewChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingAnchorRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingBringingIntoViewEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollAnimationStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingScrollOptionsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomAnimationStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IScrollingZoomOptionsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISectionsInViewChangedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectionChangedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISelectorBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoom> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomInformation> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomLocation> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISemanticZoomViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISlider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISliderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISliderStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitViewPaneClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISplitViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackLayoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStackPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStyleSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IStyleSelectorOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwapChainBackgroundPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwapChainPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItems> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISwipeItemsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconSourceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ISymbolIconStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabView2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewExternalTornOutTabsDroppingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettings2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewItemTemplateSettingsStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabCloseRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDragStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabDroppedOutsideEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITabViewTabTearOutWindowRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTip> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITeachingTipTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBlock> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBlockStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBoxBeforeTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBoxFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBoxSelectionChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBoxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextBoxTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextCommandBarFlyoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionEndedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextCompositionStartedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextControlCopyingToClipboardEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextControlCuttingToClipboardEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITextControlPasteEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerFlyoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerSelectedValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITimePickerValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleMenuFlyoutItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonIsCheckedChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSplitButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitch> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToggleSwitchStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToolTip> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToolTipFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToolTipService> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToolTipServiceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IToolTipStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeView2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeView3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewCollapsedEventArgs2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsCompletedEventArgs2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewDragItemsStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewExpandingEventArgs2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItem2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewItemTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewList> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewListFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNode> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewNodeStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITreeViewStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ITwoPaneViewStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUIElementCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUniformGridLayoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUserControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUserControlFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IUserControlStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVariableSizedWrapGridStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IViewbox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IViewboxStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContext2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutContextOverrides2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingLayoutOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IVirtualizingStackPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWebView2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWebView22> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWebView2Factory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWebView2Statics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IWrapGridStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResources> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IXamlControlsResourcesStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnchorRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnimatedIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnimatedIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnimatedVisualPlayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarDetailLabelRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarLabel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AnnotatedScrollBarScrollingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AppBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AppBarButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AppBarElementContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AppBarSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AppBarToggleButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::BitmapIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::BitmapIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Border> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::BreadcrumbBarItemClickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Button> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarDatePickerDateChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarViewDayItemChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CalendarViewSelectedDatesChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CandidateWindowBoundsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Canvas> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CheckBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ChoosingGroupHeaderContainerEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ChoosingItemContainerEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CleanUpVirtualizedItemEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ColorPicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ColumnDefinition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ColumnDefinitionCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ComboBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ComboBoxItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ComboBoxTextSubmittedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CommandBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CommandBarFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialog> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickDeferral> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogButtonClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingDeferral> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentDialogOpenedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContentPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ContextMenuEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Control> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ControlTemplate> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::CoreWebView2InitializedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DataTemplateSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickerSelectedValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DatePickerValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DragItemsStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DropDownButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::DynamicOverflowItemsChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Expander> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ExpanderCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ExpanderExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ExpanderTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FlipView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FlipViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Flyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FontIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::FontIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Frame> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Grid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GridView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GridViewHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GridViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GroupItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GroupStyle> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::GroupStyleSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::HasValidationErrorsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Hub> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::HubSection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::HubSectionCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::HubSectionHeaderClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::HyperlinkButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IconElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IconSourceElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Image> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ImageIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ImageIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBadge> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBadgeTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBarClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBarClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::InfoBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::IsTextTrimmedChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProgress> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionProvider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemContainerGenerator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsPanelTemplate> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsPickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementClearingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementIndexChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterElementPreparedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsRepeaterScrollHost> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsSourceView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsStackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ItemsWrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Layout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::LayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemCollectionTransitionProvider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsInfoRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListBoxItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListPickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListViewBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListViewBaseHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListViewHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ListViewPersistenceHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapControlMapServiceErrorOccurredEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapElementClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapElementsLayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MapLayer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MediaPlayerElement> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MediaPlayerPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControls> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MediaTransportControlsHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuBarItemFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutSubItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayModeChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemHeader> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewItemSeparator> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NavigationViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NonVirtualizingLayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NumberBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::NumberBoxValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Page> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Panel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ParallaxView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PasswordBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PasswordBoxPasswordChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PathIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PathIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PersonPicture> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PersonPictureTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PickerConfirmedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PipsPager> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PipsPagerSelectedIndexChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PipsPagerTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Pivot> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PivotItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::PivotItemEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ProgressBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ProgressBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ProgressRing> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ProgressRingTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RadioButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RadioButtons> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RadioMenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RatingControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RatingItemFontInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RatingItemImageInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RatingItemInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RefreshContainer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RefreshInteractionRatioChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RefreshStateChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RelativePanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RevealListViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RichEditBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RichEditBoxSelectionChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RichEditBoxTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RichTextBlock> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RichTextBlockOverflow> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RowDefinition> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::RowDefinitionCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollContentPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollViewer> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SectionsInViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SelectorBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SelectorBarSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SemanticZoom> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomLocation> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SemanticZoomViewChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Slider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SplitButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SplitView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::StackLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::StackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::StyleSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwapChainBackgroundPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwapChainPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwipeControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwipeItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwipeItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SwipeItems> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SymbolIcon> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::SymbolIconSource> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewExternalTornOutTabsDroppingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabCloseRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabDragStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabDroppedOutsideEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TabViewTabTearOutWindowRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TeachingTip> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TeachingTipClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TeachingTipTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextBlock> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextBox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextBoxBeforeTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextBoxSelectionChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextCommandBarFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextCompositionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextCompositionEndedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextCompositionStartedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextControlCopyingToClipboardEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextControlCuttingToClipboardEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TextControlPasteEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePickedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePicker> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePickerFlyout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePickerFlyoutPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePickerSelectedValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TimePickerValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToggleMenuFlyoutItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToggleSplitButtonIsCheckedChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToggleSwitch> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToolTip> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::ToolTipService> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewCollapsedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewDragItemsStartingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewExpandingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewItemInvokedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewList> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewNode> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TreeViewSelectionChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::TwoPaneView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::UIElementCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::UniformGridLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::UserControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::VariableSizedWrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Viewbox> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::VirtualizingLayoutContext> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::VirtualizingPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::VirtualizingStackPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::WebView2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::WrapGrid> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif
